Fetch alerts grouped by scope
GET {{base_url}}/api/alert_manager/v1/status?scope_key=
Returns the last of the most critical alerts grouped by selected scope.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
scope_key | null | (Required) Groups the results by the context key or searchable details. | |
See registered alert types for available context keys and searchable details. |
Type: String |
| scope_value
| null | | (Optional) Scope values to filter alerts by.
If omitted, the response will contain the last most critical status among available alerts.
Client may group statuses for multiple scope values by using the or()
operator:
- Example:
scope_key=KEY&scope_value=VAL1&scope_value=VAL2
- looks for two statuses - Example:
scope_key=KEY&scope_value=or(VAL1,VAL2)
- looks for single status - Example:
scope_key=KEY&scope_value=or(VAL1,VAL2)&scope_value=VAL3
- looks for two statuses
Client should explicitly url-encode values breaking URL syntax.
For example, to find a status of the resource with the stepName
key containing step 01
or step 02
: scope_key=stepName&scope_value=or(step%201,step%202)
Type: Array of String Array type description: Type: String |
RESPONSES
status: OK
{"items":[{"scope":{"resourceId":"0A0E639A-4E27-4C61-AFFF-7BE314C30A33"},"status":{"id":"01C2D69A-112B-4DE1-98AE-8688223C5F4B","createdAt":"2021-04-01T22:16:19Z","details":{"activity":{"id":"1F80FCFF-B72F-492E-8A9D-C01457FF505A","type":"8F01AC13-F59E-4851-9204-DE1FD77E36B4"},"activityId":"1F80FCFF-B72F-492E-8A9D-C01457FF505A","resourceId":"0A0E639A-4E27-4C61-AFFF-7BE314C30A33","resourceName":"DESKTOP-GCNCFC8"},"severity":"critical","type":"BackupFailed"}}]}