PUT /monitors/{id}
Changed onReplaces a monitor's configuration with the request body, so omitted fields reset to their defaults. Axiom runs the new query once before saving, and the update clears the monitor's current alert state. labelIds replaces assignments when supplied; [] clears them. Omitted or null labelIds preserves assignments on updates and creates an unlabeled resource on creation. IDs must belong to existing labels in your organization and are validated before saving.
Request
- Base URLhttps://api.axiom.co/v2
- AuthOAuth 2Authorization codehttps://accounts.google.com/o/oauth2/v2/authToken URLhttps://www.googleapis.com/oauth2/v4/tokenScopesmonitors|update
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Monitor ID.
Request body
Example request
{
"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"
}Response
Updated 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
- breaking
removed the enum value
NewValuesof the request property//// - warning
removed the request property
//// - warning
removed the optional property
////from the response with the status - info
removed the
NewValuesenum value from the////response property for the response status
- breaking
- breaking
added
subschema #2to the request bodyallOflist - breaking
the request's body type changed from
objectto no type - warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- 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
- breaking