The Alert API contains endpoints that provide alert information from a specific monitor or monitor groups.
Alert parameters
The following parameters are available in the Alert API:
| Name | Description |
|---|---|
monitorGuid |
The unique identifier of the monitor. |
monitorGroupGuid |
The unique identifier of the monitor group. |
IncludeReminders |
A boolean set to false by default. If set to true, this parameter includes the reminder alerts in the API response. |
Cursor |
A string (query) value used for traversing the dataset. For more detailed explanation, refer to Cursor.
|
Sorting |
A string that sorts the alerts in Ascending or Descending order. |
Take |
An integer ranging from 0 to 100, indicating the number of alert records returned. |
Start |
A custom date parameter (YYYY-mm-dd) used with the End parameter to specify the start date for the returned alert records. This parameter cannot be used along with the PresetPeriod. |
End |
A custom date parameter (YYYY-mm-dd) used with the Start parameter to specify the end date for the returned alert records. This parameter cannot be used along with the PresetPeriod. |
PresetPeriod |
A list of time duration to filter alerts within a specific period. This cannot be used along with the
Start and End parameters. For more detailed explanation, refer to PresetPeriod. |
Cursor
The Cursor parameter acts as a pointer that lets you traverse the alert data set. It serves as an identifier of which alert records were generated and which alert record to go to next.
For example, you have a total of 300 monitor alerts, and you want to retrieve alerts from 101-200. As the Alert API allows you to retrieve a maximum of 100 alert records per batch, calling the first batch from the API response generates the Cursors JSON object with the Next and Self values:
{
...
"Cursors": {
"Next": "qKLVZ/HGD2XeFkiwNFWJK+nRDuOjjBRipct8qOfRjRmGUG8F5P1WzrQ4p3JFfXoErs96xb+DS0SAPW+XDUi9Zw/zdo4uHXL3TYBhodxfQQul3L4mwDk=",
"Self": "KYhsR26Se8cQbeQm+o3LXawJXu3Pe6NvSefBcMivZ5QA+rFcRUrHTErK+TrhrUN3Ss8QUing/+jUkjgl3QOvB3kf3AZ+EOubhya5s3CWF+HGWEQkQQ=="
},
...
}
For this example, use the Next value to retrieve alerts from the 101st alert and onwards. Use the Self value as the cursor to retrieve the first batch of alerts from 1 to 100.
Alert endpoints
The following API methods are available:
GET /Alert/Monitor/{monitorGuid}
This method returns alert information for a specific monitor.
{
"Type": "Alert",
"Id": "cd73d946-8577-44f7-b7ed-134ae2c0985e",
"Attributes": {
"AlertType": "Reminder",
"MonitorGuid": "a591a38a-16e0-4dd2-9f15-d575b4c5a433",
"Timestamp": "2025-01-02T05:39:21",
"FirstError": "2024-12-11T20:11:01",
"MonitorCheckId": 171204791912,
"FirstErrorMonitorCheckId": 169412140540,
"ErrorDescription": "Step 4 (https://galacticshirts.com): Element '.wn-product-btn' not found.",
"IncidentKey": "9632cd34-0c13-4e2c-92cc-cca104432cd9-0-169412140545"
},
"Relationships": [
{
"Id": 171204791912,
"Type": "MonitorCheck",
"Links": {
"Self": "/MonitorCheck/171204791912"
}
},
{
"Id": 169412140540,
"Type": "MonitorCheck",
"Links": {
"Self": "/MonitorCheck/169412140540"
}
}
],
....
}
GET /Alert/MonitorGroup/{monitorGroupGuid}
This method returns alert information for a specific monitor group.
{
"Data": [
{
"Type": "Alert",
"Id": "afd846be-ddbf-49e1-ad15-2eee5f6d7544",
"Attributes": {
"AlertType": "Error",
"MonitorGuid": "a591a38a-16e0-4dd2-9f15-d575b4c5a433",
"Timestamp": "2025-01-02T02:30:46",
"FirstError": "2024-12-11T20:11:01",
"MonitorCheckId": 171193848695,
"FirstErrorMonitorCheckId": 169412140540,
"ErrorDescription": "Step 4 (https://galacticshirts.com): Element '.wn-product-btn' not found.",
"IncidentKey": "9632cd34-0c13-4e2c-92cc-cca104432cd9-0-169412140545"
},
"Relationships": [
{
"Id": 171193848695,
"Type": "MonitorCheck",
"Links": {
"Self": "/MonitorCheck/171193848695"
}
},
{
"Id": 169412140540,
"Type": "MonitorCheck",
"Links": {
"Self": "/MonitorCheck/169412140540"
}
}
]
},
.....
]
}