GET /monitors
Changed onLists monitors in the organization, sorted by name. Only returns monitors that query at least one dataset visible to the caller. Labels are resolved unless exclude=labels.
Request
- Base URLhttps://api.axiom.co/v2
- AuthOAuth 2Authorization codehttps://accounts.google.com/o/oauth2/v2/authToken URLhttps://www.googleapis.com/oauth2/v4/tokenScopesmonitors|read
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Exclude resolved label objects from each monitor response. The labelIds and labelNames fields are still returned.
Filter by label names in your organization. Repeat the parameter for multiple names, for example ?label=prod&label=team-a. Names match case-insensitively after whitespace normalization; duplicates count once. Commas are part of a name, not separators. Reading resources never creates missing labels.
How to combine label names: any (the default) requires at least one requested label on a resource; all requires every requested label on that same resource. For example, ?label=prod&label=team-a matches either label, while ?label=prod&label=team-a&labelMatch=all requires both. Unknown names have no matches with any and make all return no resources. Without label parameters, labelMatch has no effect.
Return monitors assigned every specified label ID. When combined with label names, both filters must match; labelMatch applies only to names.
Response
Monitors visible to the caller.
Example response
[
{
"alertOnNoData": true,
"aplQuery": "| where severity = 'error' | count() > 100",
"columnName": "cpu_usage",
"compareDays": 7,
"description": "Monitors CPU usage and alerts when it exceeds 90%",
"disabledUntil": "2024-04-01T00:00:00Z",
"intervalMinutes": 5,
"mplQuery": "test-metrics:http_request_duration_seconds",
"name": "Production CPU Monitor",
"notifierIds": [
"z0NfJw64aKagPOBBIJ"
],
"operator": "Above",
"rangeMinutes": 5,
"resolvable": true,
"secondDelay": 300,
"threshold": 90,
"tolerance": 10,
"triggerAfterNPositiveResults": 3,
"triggerFromNRuns": 3,
"type": "Threshold",
"createdAt": "2024-03-20T10:00:00Z",
"createdBy": "usr_789xyz",
"datasets": [
"production-logs"
],
"id": "QgOLFXIvK0ZbYf3tZE",
"updatedAt": "2024-03-20T10:30:00Z"
}
]Changes
- warning
removed the optional property
/////from the response with the status - info
removed the
NewValuesenum value from the/////response property for the response status
- warning
- warning
added the new
NewValuesenum value to the/////response property for the response status - info
added the new optional
queryrequest parameterlabel - info
added the new optional
queryrequest parameterlabelMatch - info
added the optional property
/////to the response with the status - info
added the optional property
/////to the response with the status - info
added the optional property
//to the response with the status - info
added the required property
//to the response with the status
- warning