Query log events
The endpoint provides functionality to query log events with provided query parameters.
HTTP request
GET https://$instanceId.id.nevis.cloud/nevis/api/v1/events
Parameters
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
fromDate | query | string | optional | Query events by starting date. The date is in the ISO 8061 timestamp format YYYY-MM-DDThh:mm:ss.SSSZ |
toDate | query | string | optional | Query events by end date. The date is in the ISO 8061 timestamp format YYYY-MM-DDThh:mm:ss.SSSZ |
timespan | query | string | optional | Query events by a timespan. The timespan is in the ISO 8061 duration format P<date>T<time> . Default: P30D |
offset | query | integer | optional | Offset-based pagination parameter to define start page. Default: 1 |
limit | query | integer | optional | Offset-based pagination parameter to define page size. Default: 50 |
status | query | enum | optional | Query events status. Values: succeeded , failed |
filter | query | string | optional | Query events by content |
filterType | query | enum | optional | The type of the filter Values: loginId , userId , description . No value defaults to query events by content. Specified value will restrict query to the given field |
Example request
Query for all events in the last hour.
timespan=P0DT1H
curl "https://$instanceId.id.nevis.cloud/nevis/api/v1/events?timespan=$timespan" \
--header "Authorization: Bearer $accessKey"
HTTP response
On success
HTTP/1.1 200
is returned on success.
Parameter | Type | Description |
---|---|---|
count | integer | The total number of events matching the query parameters independent of the provided pagination query parameters |
events | array of events | The collection of log events based on the pagination query parameters. See log event |
Example response
{
"count": 2,
"events": [
{
"actor": {
"loginId": "[email protected]",
"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0",
"id": "c3fe8690-46ab-427a-aeb4-91a506f903a9",
"type": "user"
},
"eventId": "4b2a2eb5-feaf-11ec-8119-000d3aabaf4b",
"name": "user.password.reset",
"description": "User password reset",
"user": {
"firstName": "Abigail",
"lastName": "Mackay",
"loginId": "[email protected]",
"id": "c3fe8690-46ab-427a-aeb4-91a506f903a9",
"languageCode": "en",
"state": "active",
"properties": {
"preferredContactChannel": "email"
}
},
"timestamp": "2022-07-08T11:15:09.652Z",
"status": "succeeded"
},
{
"actor": {
"loginId": "[email protected]",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
"id": "78f89c75-8223-4546-a8ac-0ff9f233c6ee",
"type": "admin"
},
"eventId": "62143bf4-fdd3-11ec-811b-6045bd95012c",
"name": "user.deleted",
"description": "User deleted",
"user": {
"firstName": "Abraham",
"lastName": "George",
"loginId": "[email protected]",
"id": "eff5ff9a-1ff5-43a6-836e-eb13886b4ee3",
"languageCode": "en",
"state": "active",
"properties": {
"preferredContactChannel": "email"
}
},
"timestamp": "2022-07-07T09:00:54.328Z",
"status": "succeeded"
}
]
}
On failure
HTTP/1.1 401
is returned if the authorization fails due to an invalid access key.
HTTP/1.1 500
is returned if an unexpected error occurs.