Get Alerts for Alert-Triggered Time

Gets the alert occurrences based on the alert-triggered time.

Notes

There are special characters that can be used in a query string:

  • (+) represents the next field and must be URL-encoded.
  • (:) represents equals. An example is key : value.
  • Space characters must be URLencoded.
  • Date format must be yyyy-MM-ddTHH:mm:ssZ (GMT).

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:

  1. Get all occurrences of an alert.
  2. Get alert occurrences of an alert that is triggered within a specific duration.
  3. 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.

get
/api/v2/tenants/{tenantId}/alerts/{alertId}/occurrences

Path Parameters

  • tenantIdstringrequired

    Describes the client ID or msp ID of the tenant

  • alertIdstringrequired

Query Parameters

  • pageSizeinteger

    Default: 100

  • queryStringstring

00