List the Alerts Occurences triggered
List all the alerts occurences triggered for the client in a given duration of an alert.
The process for pagination
The API provides the results in descending order of alert-triggered date. The latest alert appears first based on the alert-triggered time. The process for handling any number of occurrences include the following:
- Get all occurrences of an alert.
- Get alert occurrences of an alert that is triggered within a specific duration.
- Traverse through each page of occurrences.
Get All occurrences of an alert
To fetch all alert occurrences irrespective of the alert-triggered time, provide the URI:
/tenants/{tenantId}/alerts/{alertId}/occurrences
Get Alert occurrences of an alert that is triggered within a specific duration
To fetch raw alerts triggered within a specific duration, provide the start time and end time. To fetch raw alerts triggered between January 13th 2017 to February 13th 2017, provide the startTime of 2017-01-13T00:00:00 0000 and an endTime of 2016-02-13T00:00:00 0000. This is the URI for that request:
/tenants/{tenantId}/alerts/{alertId}/occurrences?queryString=startTime:2017-01-13T00:00:00 0000+endTime:2017-02-13T00:00:00 0000
Traverse through each page of occurrences
There is a limit of 100 results per page. If an alert has 120 occurrences, the latest 100 results will appear in the first page. To traverse to the second page, use the endDate from the first page and provide it as the endTime in the query string. The second page will return the remaining 20 alerts.
Path Parameters
- alertId
Alert unique Identifier
- clientId
Describes the clientId of the tenant
Query Parameters
- pageSize
Default: 100
- queryString
Responses
- results
- pageSize
- nextPage
- startDate
- endDate
- descendingOrder