GET /monitors/{id}
Changed onRetrieves a monitor by ID. Returns 404 if the monitor doesn't exist or the caller can't query its datasets. 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.
Path parameters
Monitor ID.
Query parameters
Exclude resolved label objects from the monitor response. The labelIds and labelNames fields are still returned.
Response
Monitor.
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 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