API - incidents and alerting
All paths are relative to https://api.wakora.io/v1/; see the overview
for tokens, scopes and errors.
Incidents
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /incidents?state=&severity=&server=&rule=&from=&to=&limit=&offset= | read | Incident list. state is open, acked or resolved; limit caps at 200. |
| GET | /incidents/{num} | read | One incident with its full timeline and the runbooks that apply to it. Numbers are the per-workspace ones the console shows. |
| POST | /incidents/{num}/ack | act | Acknowledge. Attributed to the token's owner, or to "AI" for an MCP token. |
| POST | /incidents/{num}/resolve | act | Resolve. Resolving a host that is still down is turned into an acknowledgement, and the answer says so; the recovery resolves it. |
| POST | /incidents/{num}/jira | act | Create a Jira issue for the incident (Jira must be connected in Integrations). Repeated calls answer the existing issue key. |
An incident row looks like:
{
"num": 42, "title": "disk almost full", "rule": "disk_critical",
"severity": "critical", "state": "open",
"entity": "/var", "server": "b62a...", "hostname": "web-1",
"value": 96.2, "threshold": 95,
"startedAt": "2026-08-13T21:04:11Z", "ackedAt": null,
"resolvedAt": null, "lastEventAt": "2026-08-13T21:04:11Z"
}
Resolving an incident whose condition still holds is honoured for the moment and reopened within minutes if the condition is still there; the timeline shows both. Use a maintenance window when you want quiet rather than a closed incident.
Runbooks
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /runbooks | read | Every runbook of the workspace: rule, scope (all, tag, host), value, pattern, title, url, content. |
| POST | /runbooks | act | Create one with the same fields. value is the tag name for a tag scope, the host uuid for a host scope. |
| POST | /runbooks/{id} | act | Update; fields you leave out keep their value. |
| DELETE | /runbooks/{id} | act | Delete. |
Writes also need the runbooks capability of the token owner's role; a workspace token without a person behind it needs the admin scope. Runbooks are a Pro feature, so on a lower plan the routes answer 403. How a runbook is matched to an incident is in Runbooks.
Alert rules
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /rules?server= | read | The rule catalog with armed verdicts and your overrides. server scopes the verdicts to one host and includes its per-host rows. |
| POST | /rules | admin | Save an override or a custom rule: ruleKey (omit to mint a custom one), name, metric, tagKey, op (gte, lte, eq), threshold, disarm, forSec, severity, enabled, and pattern for a log-pattern rule. |
| DELETE | /rules/{ruleKey} | admin | Reset an override back to the catalog default. |
An override tunes a rule, it does not redefine it: the metric an event-born rule watches, and whether a rule is auto-armed, come from the catalog even after an override. Metric names and the wildcard syntax are in the metrics reference; every built-in rule with its defaults is in the rules catalog.
Maintenance windows
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /maintenance | read | Active and scheduled windows. |
| POST | /maintenance | act | Schedule a window: name, optional server (omit for the whole workspace), start (default now), durationSec (default 7200), repeat (daily or weekly, omit for one-off). |
| DELETE | /maintenance/{id} | act | End or cancel a window. |
A deployment pipeline typically opens a two-hour window on the hosts it touches right before the rollout and deletes it right after:
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
"https://api.wakora.io/v1/maintenance?name=deploy+2026-09-05&server=$UUID&durationSec=1800"
Cron heartbeats
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /heartbeats | read | Heartbeat jobs with their ping URLs, severity and last ping time. |
| POST | /heartbeats | act | Create a job: name, intervalSec (60 or more), optional severity (warning, the default, or critical). The grace period is a quarter of the interval, at least a minute. The answer carries the pingUrl to put in the crontab. |
| DELETE | /heartbeats/{id} | act | Delete a job. |
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
"https://api.wakora.io/v1/heartbeats?name=nightly-backup&intervalSec=86400"
# {"ok":1,"id":7,"pingUrl":"https://app.wakora.io/?hb=hb_..."}
The ping itself is a plain GET to the pingUrl and needs no token; see
Cron heartbeats.
Related
- Alert rules, Incidents
- Webhooks for being told about incidents instead of polling
- MCP for the same operations as AI tools