Summary:
List available events, or raise a new event.
URL:
http(s)://{server hostname}/api/events
Methods summary
- GET Method - lists available events.
- POST Method - raises an event.
GET Method detail
Lists available events.
Request:
Name | Description |
---|---|
updateId |
event update identifier, use the updateId in the last result set to get new events. |
openedFrom |
event opening time lower bound. |
openedTo |
event opening time upper bound. |
closedFrom |
event closing time lower bound. |
closedTo |
event closing time upper bound. |
view |
events filtered by view. |
mask |
event severity mask, severities can be added together to request multiple severities together. 1 = Info, 2 = Minor, 4 = Major, 8 = Sever, 16 = Critical e.g. mask=24 would return both Sever and Critical events.
|
States |
event state, either “open”, “closed”, “finalized” and “all”. Multiple event states can be specified together. e.g. states=open&states=closed
|
Response:
Response includes an array of events. Each event has the following attributes:
Name | Description |
---|---|
description |
event description. |
details |
event details. |
objectKeyInfo |
object key, consisting of :
|
severity |
event severity where :
|
description |
event Description. |
sourceDescription |
source description. |
impactDescription |
impact description. |
timeStamp |
event timestamp. |
id |
event identifier. |
eventNumber |
event number. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/events?media=json
OUTPUT
{
“events” : [ {
"description" : "Entuity Server Started",
"details" : "Restarted",
"objectKeyInfo" : {
"swId" : 0,
"compId" : {
"ids" : [ 4096, 0, 0, 0 ]
}
},
"severity" : 2,
"sourceDescription" : "Entuity server London01",
"impactDescription" : "Entuity service",
"timeStamp" : 1540894535,
"id" : 786437,
"eventNumber" : 480
},
{
...removed for brevity...
} ],
"updateId" : 479,
"count" : 459} ]
INPUT
curl -u admin:admin https://localhost/api/events?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<eventsCollection count="459" updateId="479">
<events>
<event eventNumber="480" severity="2" timeStamp="1540894535" id="786437">
<description>Entuity Server Started</description>
<details>Restarted</details>
<objectKeyInfo>
<swId>0</swId>
<compId>
<ids>
<ids>4096</ids>
<ids>0</ids>
<ids>0</ids>
<ids>0</ids>
</ids>
</compId>
</objectKeyInfo>
<sourceDescription>Entuity server London01</sourceDescription>
<impactDescription>Entuity service</impactDescription>
</event>
<event>
...removed for brevity...
</event>
</events>
</eventsCollection>
POST Method detail
Raises an event.
Request:
Name | Description |
---|---|
id |
event type. |
source |
name to display for the event source field. If not specified, the object key's name is displayed (see below). |
objectKeyInfo |
object key, consisting of :
|
name |
event name. |
severity |
event severity where :
|
reason |
reason for event. |
impactDescription |
impact description |
externalId |
extra identifier that can be included to the event, e.g. a custom event attribute. This is a string field. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/events?media=json -X POST -H "content-type:application/json" -d \
'{
"reason" : "API test",
"name" : "New Event",
"source" : "Event source API test",
"id" : 786441,
"impactDescription" : "Entuity service",
"severity" : 6,
"objectKeyInfo" : { "swId" : 12345, "compId" : { "ids" : [4096, 0, 0, 0] } },
"externalId" : "12"
}'
OUTPUT
{
"message" : "Event sent"
}
INPUT
curl -u admin:admin https://localhost/api/events -X POST -H "content-type:application/xml" -d \
'<eventInfo>
<reason>API test</reason>
<name>New event</name>
<details>New event details</details>
<id>786441</id>
<impactDescription>Entuity service</impactDescription>
<severity>2</severity>
<objectKeyInfo>
<swId>0</swId>
<compId>
<ids>
<ids>4096</ids>
<ids>0</ids>
<ids>0</ids>
<ids>0</ids>
</ids>
</compId>
</objectKeyInfo>
</eventInfo>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statusInfo>
<message>Event sent</message>
</statusInfo>
Comments
0 comments
Please sign in to leave a comment.