Overview
Active Events can be retrieved from the API by issuing a GET request to the following resource.
GET /api/v1/events/event.json
Usage
The following parameters are passed to this resource as a query string.
filter: Specify a URL encoded filter. The filter parameter should be used as described in the Filtering Sinefa Reports article (optional).
e.g. &filter=instance+%3d+London
start: A time-stamp representing the start of the range to query in milliseconds since epoch (required).
end: A time-stamp representing the end of the range to query in milliseconds since epoch (required).
e.g. &start=1365487800000&end=1365491400000
Return Data
The following JSON structure is returned.
{ eventListEntries : [ event_uuid : { name: <event name>, raised: <event raised timestamp>, description: <event description>, klass: <event class, raised=1>, instance: <raising instance name>, entity: <raising instance uuid>, acked: <event acknowledged timestamp, null=not acked>, acker: <event acknowledged by>, severity: <event severity> } ] }
Example
This example fetches the active events for the 15th April 2013. Request
curl -u <username>:<password> -H 'Content-Type: application/json' \ 'https://app.sinefa.com/api/v1/events/event.json?filter=&start=1365948000000&end=1366034399000'
Response
{ eventListEntries: { "A38AFB77BCF54C92AC1688E47B2D5AC6": { name: "Delay", raised: 1366253580, description: "(delay >= 2ms for 5 min), observed value 239.094 ms", klass: 1, instance: "sfa-shanghai", entity: "05F2D25F34F248ACA5CD403C4208D0A1", acked: null, acker: null, severity: 4 }, ... } }
Acknowledging Active Events Overview
Active Events can be acknowledged by issuing a POST request to the following resource.
POST /api/v1/events/event/.json
Usage
The following JSON structure must be POSTed.
{ instance: <raising instance name>, entity: <raising instance uuid>, name: <event name>, desc: <event description> }
See Also
API Overview
Reporting (v2)
Reporting: Quality
How to generate date specific reports through API queries
Comments
0 comments
Article is closed for comments.