Summary:
List the Views in a config set, and add Views to a config set.
URL:
http(s)://{server hostname}/api/cfg/serverGroupConfig/{serverGroupId}/views
Methods summary
- GET Method - lists the Views in a specified config set.
- POST Method - add a new top-level View or Subview to a specified config set.
GET Method detail
Lists the Views in a specified config set.
Response:
Name | Description |
---|---|
viewName |
name of the View assigned to this config set. |
baseViewType | if View content is based on union of the Views or intersection of the Views. |
baseViewNames |
names of the View that form the base of this current View. |
contentsType | if View content is automatically (union/intersection) or manually determined. |
domainFilter | name of the domain filter applied to this 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 identifier of the View. |
count | number of Views in the config set. |
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/views?media=json
OUTPUT
{
"items" : [ {
"items" : [ {
"viewName" : "All Objects",
"baseViewType" : 0,
"baseViewNames" : [ ],
"contentsType" : 2,
"domainFilter" : "All Objects",
"eventFilter" : "All Events",
"situationFilter" : "All Incidents",
"owner" : "<system>",
"userGroups" : [ {
"groupName" : "Administrators",
"editable" : true
} ],
"longitude" : 0.0,
"latitude" : 0.0,
"locationName" : null,
"locationManuallySet" : false,
"viewUUID" : "--AllObjectsView--"
}, {
"viewName" : "Test1",
"baseViewType" : 0,
"baseViewNames" : [ ],
"contentsType" : 1,
"domainFilter" : "All Objects",
"eventFilter" : "All Events",
"situationFilter" : "All Incidents",
"owner" : "<system>",
"userGroups" : [ {
"groupName" : "Administrators",
"editable" : true
}, {
"groupName" : "All Users",
"editable" : false
} ],
"longitude" : 0.0,
"latitude" : 0.0,
"locationName" : null,
"locationManuallySet" : false,
"viewUUID" : "63007757-8a49-4258-b647-24802a8a4bf3"
} ],
"count" : 2
}
POST Method detail
Add a new top-level View or Subview to a specified config set.
Request:
See the 'Response' table for GET Method above.
Response:
Displays success or error.
Examples:
To add a top-level View:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/views -X POST -H "content-type:application/json" -d '
{
"viewName" : "All The Stuff",
"baseViewType" : 1,
"baseViewNames" : [ "All Objects" ],
"contentsType" : 2,
"domainFilter" : "All Objects",
"eventFilter" : "Test Event Filter 1",
"situationFilter" : "All Incidents",
"owner" : "kim1",
"userGroups" : [ {
"groupName" : "Administrators",
"editable" : true
} ],
"longitude" : 0.0,
"latitude" : 0.0,
"locationName" : "",
"locationManuallySet" : false
}'
OUTPUT
{"code":412,"reasonPhrase":"Precondition Failed","description":"Error adding view to Entuity Server Group configuration: No event filter named 'Test Event Filter 1' exists"}
To add a Subview:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/82e7c418-cd48-4fbf-857b-cddb475841a2/views -X POST -H "content-type:application/json" -d '
{
"viewName" : "All Customers/Customer Zero",
"baseViewType" : 0,
"baseViewNames" : [ ],
"contentsType" : 1,
"domainFilter" : "All Objects",
"eventFilter" : "Another Filter",
"situationFilter" : "All Incidents",
"owner" : "kim1",
"userGroups" : [ {
"groupName" : "Administrators",
"editable" : true
} ],
"longitude" : 0.0,
"latitude" : 0.0,
"locationName" : "",
"locationManuallySet" : false
}'
OUTPUT
{
"errorCode" : "SUCCESS",
"errorDetails" : null,
"data" : {
"configurationChangeId" : 197,
"serverGroupId" : "82e7c418-cd48-4fbf-857b-cddb475841a2",
"timestampSec" : 1680198645,
"modifiedBy" : "admin"
}
}
Comments
0 comments
Please sign in to leave a comment.