Documentation Reference REST API reference API: alarms
Reference For: developers
API: alarms
Operations of the alarms tag of the native REST API.
Alarms
GET /v1/alarms
Lists alarm definitions with their states.
CLI kyvernon alarms list
Parameters
Name In Type Required Description targetquery string or nullOnly alarms applicable to this target.
Responses
Status Description Schema 200 OK array of AlarmView
POST /v1/alarms
Defines an alarm.
CLI kyvernon alarms create --body <json>
Request body
application/json: CreateAlarmRequest
Name Type Required Description actionsarray of AlarmAction Actions. descriptionstringDescription. enabledbooleanEnabled (default true). namestringyes Name. scopeIdstringyes Scope entity id. triggerAlarmTriggeryes Trigger.
Responses
POST /v1/alarms/clear-triggered
Resets triggered (non-green) alarm states to green (ClearTriggeredAlarms).
CLI kyvernon alarms clear-triggered
Request body
application/json: ClearTriggeredAlarmsRequest
Name Type Required Description statusesarray of AlarmStatusView Only clear these statuses; empty clears every non-green state.
Responses
Status Description Schema 204 Done; no body
GET /v1/alarms/{id}
One alarm definition with its states.
CLI kyvernon alarms get <id>
Parameters
Name In Type Required Description idpath stringyes Id of the alarm definition
Responses
PUT /v1/alarms/{id}
Changes an alarm definition (Alarm.Edit on the alarm's scope). Absent fields keep their value; a new trigger resets the states of the alarm to gray (the next event or sample sets them again).
CLI kyvernon alarms update <id> --disable
Parameters
Name In Type Required Description idpath stringyes Id of the alarm definition
Request body
application/json: UpdateAlarmRequest
Name Type Required Description actionsarray of AlarmAction or null Actions (replaces the list). descriptionstring or nullDescription. enabledboolean or nullEnabled. A disabled alarm is not evaluated. expectedVersioninteger (int64) or nullVersion the client read (version of the alarm record); CONFLICT when it changed. namestring or nullName. scopeIdstring or nullScope entity id. A new scope needs Alarm.Create there and clears the states. triggerAlarmTrigger or null
Responses
Status Description Schema 200 OK AlarmView400 Invalid argument; the error body names the field ErrorBody404 Not found (or not visible to the caller) ErrorBody409 Conflict: the object exists, or expectedVersion is stale ErrorBody
DELETE /v1/alarms/{id}
Deletes an alarm.
CLI kyvernon alarms delete <id>
Parameters
Name In Type Required Description idpath stringyes Id of the alarm definition
Responses
Status Description Schema 204 Done; no body
POST /v1/alarms/{id}/acknowledge
Acknowledges an alarm on a target.
CLI kyvernon alarms acknowledge <id> <target>
Parameters
Name In Type Required Description idpath stringyes Id of the alarm definition
Request body
application/json: AcknowledgeRequest
Name Type Required Description targetIdstringyes Entity whose state is acknowledged.
Responses
Status Description Schema 204 Done; no body
Guides
Previous API conventions Next API: auth
Version 0.1.