Summary:
Update, rename or delete Views in a config set.
URL:
http(s)://{server hostname}/api/cfg/serverGroupConfig/{serverGroupId}/views/{viewUUID}
PUT Method detail - update View
PUT Method detail - rename View
Methods summary
- PUT Method - updates a View.
- PUT Method - renames a View.
- DELETE Method - delete a View from a specified config set.
PUT Method detail - update View
Updates a specified View.
Request:
Name | Description |
---|---|
viewName |
name of the View. |
eventFilter |
name of the event filter applied to this View. |
situationFilter |
name of the incident filter applied to this View. |
owner |
user account that owns the user group. Can be 'system'. |
groupName |
name of the user group. |
editable | if the user group is editable, either 'true' or 'false'. |
longitude | longitude of the View, as specified for Geographical Map mode. |
latitude | latitude of the View, as specified for Geographical Map mode. |
locationName | name of the View's location, as specified for Geographical Map mode. |
locationManuallySet | if the View's location is manually set, either 'true' or 'false'. |
viewUUID | unique universal ID of the View. |
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/views/95ff210b-6249-4573-b38e-c957cffad4ad -X PUT -H "content-type:application/json" -d '
{
"viewName" : "T2",
"eventFilter" : "Test Event Filter",
"situationFilter" : "Test Incident Filter",
"owner" : "admin",
"userGroups" : [ {
"groupName" : "Administrators",
"editable" : true
}, {
"groupName" : "Guys",
"editable" : false
} ]
}
OUTPUT
{
"viewName" : "T2",
"baseViewType" : 0,
"baseViewNames" : [ ],
"contentsType" : 1,
"domainFilter" : "All Objects",
"eventFilter" : "Test Event Filter",
"situationFilter" : "Test Incident Filter",
"owner" : "admin",
"userGroups" : [ {
"groupName" : "Administrators",
"editable" : true
}, {
"groupName" : "Guys",
"editable" : false
} ],
"longitude" : 0.0,
"latitude" : 0.0,
"locationName" : "",
"locationManuallySet" : false,
"viewUUID" : "95ff210b-6249-4573-b38e-c957cffad4ad"
}
PUT Method detail - rename View
Renames a specified View.
Response:
Same as 'Request' table for PUT Method - update View above.
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/views/95ff210b-6249-4573-b38e-c957cffad4ad -X PUT -H "content-type:application/json" -d '
{
"viewName" : "T2 renamed",
}
OUTPUT
{
"viewName" : "T2",
"baseViewType" : 0,
"baseViewNames" : [ ],
"contentsType" : 1,
"domainFilter" : "All Objects",
"eventFilter" : "Test Event Filter",
"situationFilter" : "Test Incident Filter",
"owner" : "admin",
"userGroups" : [ {
"groupName" : "Administrators",
"editable" : true
}, {
"groupName" : "Guys",
"editable" : false
} ],
"longitude" : 0.0,
"latitude" : 0.0,
"locationName" : "",
"locationManuallySet" : false,
"viewUUID" : "95ff210b-6249-4573-b38e-c957cffad4ad"
}
DELETE Method detail
Deletes a View from a specified config set.
Request:
Specify a View by its UUID or View name.
Response:
'SUCCESS' when successfully deleted.
Examples:
Specifying a View by its UUID:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/views/38aeb745-000c-411f-a987-c761622aab85?media=json -X DELETE
OUTPUT
{
"errorCode": "SUCCESS",
"errorDetails": "view 'Test1' removed"
}
Specifying a View by its View name:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/views/Test1?media=json -X DELETE
OUTPUT
{
"errorCode": "SUCCESS",
"errorDetails": "view 'Test1' removed"
}
Comments
0 comments
Please sign in to leave a comment.