...
The body of the request must be a valid JSON document, containing the desired event properties as a hash. See opEvents Normalised Event Properties for a description of all the properties. Some properties (e.g. date
, time
) can be omitted and will be filled in automatically. As an absolute minimum, a node
or a host
property, and an event
property must be present. If (and only if!) node
is not present, then opEvents looks up host
and attempts to find the canonical node for the hostname or IP address from the host
property - this heuristic is described in more detail here. The resulting node
must be known to opEvents and must not be disabled for opEvents.
...
HTTP Status | HTTP Headers | Body | Description |
---|---|---|---|
201 | Location | JSON hash object with success and id properties | The success property is set to 1 and only if the request was successful. The id property is the new event's ID (but see the Limitations section below) The Location header contains the complete URL for retrieving the newly created event. |
...
HTTP Status | Body | Description |
---|---|---|
401 | N/A | You are not authenticated. |
404 | N/A | You are authenticated but not authorised to create events in opEvents. |
400 | JSON hash object with success being 0 and an error property. | The error property contains an explanation of what went wrong with your request, e.g. why the parameters were considered invalid. |
...
GET of /events for Event Listing
GET /omk/opEvents/events
If your GET call provides an Accept
header indicating JSON, or if you use /events.json
as URI, then opEvents will look for matching events and return their properties in the form of a JSON object, an array of hashesevents. Extra query parameters can be used to narrow down the listing or search for particular events only; without parameters you will get all events of the last two hours.
...
Parameter | Description |
---|---|
o_start , o_end | Start and end of the period you are interested in. Note, you should pass o_summarise=1 to make sure UNIX time is not rounded. |
o_node_name | Name of the node you are interested in. You can use " regex:<regular expression> " or a plain text string. |
ev_event_name | Name of the event you are interested in. You can use " regex:<regular expression> " or a plain text string. |
ev_event_type | Type of the event, i.e. what source it came from. e.g: nmis_eventlog , api . |
ev_event_element | Element in question. Not present for all events. Regex or plain text string. |
| Details that were supplied with the event. Not present for all events. Regex or plain text string. |
...
HTTP Status | Body | Description |
---|---|---|
200 | JSON array of hashesobjects | Each array element is a hash of JSON object with the raw properties of the event in question. |
...
If your GET call provides an Accept
header indicating JSON, or if you use /events/<eventid>.json
as URI, then the event will be looked up and all properties will be returned in the form of a JSON hashobject.
Successful Response
HTTP Status | Body |
---|---|
200 | JSON hash object with all known event properties. |
...
HTTP Status | Body | Description |
---|---|---|
401 | N/A | You are not authenticated. |
404 | N/A | You are authenticated but not authorised to view events in opEvents. |
404 | JSON hash object with an error property. | The |
...