Skip to main content

Alert Playbooks

A playbook says what to do when an alert fires: a safety note, the checks to make, the likely cause, and the fix. It is written once for a metric (on every machine, or on one machine) or for a composite rule, and every alert raised on that target carries it. All endpoints require a bearer JWT and the Alert Rules settings tab. Reading the playbook on an alert needs only the Alerts page.

Where a playbook shows up:

  • On the alert itself, as its playbook field (see Alerts).
  • In the alert's notifications: email, Slack, Microsoft Teams and web push show it, and webhooks receive it (see Notifications).
  • As the first steps of a work order opened from the alert, by a person or by a rule (see Work Orders).
  • In what a work order handed to MaintainX or Maximo carries.

Endpoints​

MethodPathDescription
GET/api/v1/alert-playbooksList playbooks
GET/api/v1/alert-playbooks/coverageHow many recent alerts had a playbook
POST/api/v1/alert-playbooksCreate a playbook (Admin)
PUT/api/v1/alert-playbooks/{playbook_id}Update a playbook's guidance (Admin)
DELETE/api/v1/alert-playbooks/{playbook_id}Delete a playbook (Admin)

Endpoints marked Admin require an account administrator role. An administrator limited to some machine groups sees and writes the playbooks of machines in scope (a composite rule's machine counts); a playbook for a metric on every machine needs an administrator whose access covers all machines.

Which playbook an alert takes​

An alert takes the most specific playbook that matches it, in the order threshold rules follow:

  1. Its composite rule's, for an alert raised by a composite rule.
  2. Its machine's, for the alert's metric.
  3. Its metric's, on every machine.

An alert with no matching playbook has playbook: null.

Create a playbook​

POST /api/v1/alert-playbooks

FieldTypeRequiredDescription
metric_namestringOne targetThe metric the playbook is for (up to 255 chars)
machine_iduuidNoWith metric_name: only that machine; omit for every machine
composite_rule_iduuidOne targetThe composite rule the playbook is for, instead of a metric
safety_notestringNoWhat must not be skipped (up to 500 chars)
check_stepsarray of stringNoThe checks, in order (up to 12, each up to 200 chars)
likely_causestringNoThe likely cause (up to 1,000 chars)
fixstringNoThe fix (up to 2,000 chars)

A playbook names one target: a metric_name (with or without a machine_id), or a composite_rule_id, not both. It must say something: at least one of safety_note, check_steps, likely_cause or fix. Text is trimmed, and blank checks are dropped. A second playbook for the same target returns 409.

{
"metric_name": "vibration_rms",
"safety_note": "Lock out the spindle drive before opening the guard.",
"check_steps": [
"Check the bearing housing temperature with an IR thermometer",
"Listen for grinding at low speed",
"Check the belt tension"
],
"likely_cause": "Bearing wear on the drive end.",
"fix": "Replace the drive-end bearing and re-grease the non-drive end."
}

Response: 201 Created

{
"id": "c3d4...",
"scope": "all_machines",
"metric_name": "vibration_rms",
"machine_id": null,
"machine_name": null,
"composite_rule_id": null,
"composite_rule_name": null,
"safety_note": "Lock out the spindle drive before opening the guard.",
"check_steps": [
"Check the bearing housing temperature with an IR thermometer",
"Listen for grinding at low speed",
"Check the belt tension"
],
"likely_cause": "Bearing wear on the drive end.",
"fix": "Replace the drive-end bearing and re-grease the non-drive end.",
"created_at": "2026-11-07T09:00:00Z",
"updated_at": "2026-11-07T09:00:00Z",
"updated_by_name": "Dana Reyes"
}

scope is all_machines, machine, or composite_rule.

Update and delete​

PUT /api/v1/alert-playbooks/{playbook_id} replaces the guidance (safety_note, check_steps, likely_cause, fix). The target never changes: a different target is a different playbook. DELETE /api/v1/alert-playbooks/{playbook_id} removes it (204 No Content).

Work orders already opened keep the steps they were opened with; editing a playbook never rewrites them.

As work-order steps​

A work order opened from an alert starts with the playbook as its instructions, in the portal language of the person who opened it:

  1. The safety note, as its own step.
  2. One step per check.
  3. The fix, with the likely cause in its body.

Create the work order with include_playbook: false to leave them out.

Coverage​

GET /api/v1/alert-playbooks/coverage

How many of the last 30 days' alerts came with a playbook, and the busiest metrics and composite rules without one (at most 8), to say where a playbook is most worth writing.

{
"window_days": 30,
"total_alerts": 142,
"covered_alerts": 97,
"uncovered": [
{
"metric_name": "motor_current",
"composite_rule_id": null,
"composite_rule_name": null,
"alert_count": 31,
"machine_count": 4
}
]
}