Events API
This document describes the API operations for events. An event is a small operation done in Onegini IDP.
API-1 Search for events
Endpoint: GET /api/events?actor={actor_id}&offset={offset}&limit={limit}
The response will be HTTP 200 OK
even if no events were found.
Param | Required | Description |
---|---|---|
actor | Yes | User, that triggered the event, for which events should be returned, eg. admin (more info) |
offset | Yes | Offset from which to start, eg. 0 |
limit | Yes | Number of events that should be returned, eg. 10 |
Example response for endpoint GET /api/events?actor=admin&offset=1&limit=2
{
"resultSet": [
{
"event_identifier": "289abf40-70cf-4e26-9586-e0c5a95974f1",
"occurred": 1447157033461,
"event_type": "ApplicationUpdatedEvent",
"client_ip": "127.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0",
"event_name": "Onegini application updated"
},
{
"event_identifier": "b00dbb11-4631-4ffd-867e-a8fe5c30d559",
"occurred": 1447156984503,
"event_type": "ApplicationUpdatedEvent",
"client_ip": "127.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0",
"event_name": "Onegini application updated"
}
],
"pagination": {
"totalResults": 2,
"offset": 1,
"pageSize": 2,
"rangeStart": 2,
"rangeEnd": 2,
"firstPage": false,
"lastPage": true,
"numberOfPages": 1,
"visiblePages": [
{
"pageNumber": 1,
"offset": 0,
"active": false
}
]
}
}
Error messages do have an error code plus a small description. The following errors can occur:
HTTP ERROR | Error Code | Description |
---|---|---|
400 | 4001 | No or malformed actor_id |
400 | 4002 | Invalid limit (must be a number between 1 and 1000) |
400 | 4003 | Invalid offset (must be at least 0) |