Skip to main content

List incidents

GET/api/watch/incidents

Lists recorded incidents, newest first. The list leaves out the captured logs: pre_logs and post_logs are empty strings. Fetch one incident with Get incident to read them.

Authorizations

Authorizationstringheader

The token you start the server with: homebutler serve --token <token>, or web.token in the config file. Send it as Authorization: Bearer <token>. When the server has a token, every /api/ route except the CORS preflight requires it, reads included.

Query parameters

limitinteger

The most incidents to return. A value below 1 or one that is not a number is ignored, and the default applies.

Default: 25Range: 1 ≤ x ≤ ∞
containerstring

Return only incidents for this watch target.

Example: flaky

Response

200 · application/json

The incidents, or an empty array when nothing was recorded.

idstringrequired

The incident id.

containerstringrequired

The watch target that restarted.

detected_atstring<date-time>required

When the restart was detected.

restart_countintegerrequired

Docker's restart count at detection.

prev_started_atstringrequired

When the previous run started, RFC 3339 in UTC, or an empty string when unknown.

curr_started_atstringrequired

When the current run started, RFC 3339 in UTC, or an empty string when unknown.

pre_logsstringrequired

Logs captured before the restart. Empty in a list.

post_logsstringrequired

Logs captured at detection. Empty in a list.

exit_codeinteger

The exit code of the previous run.

oom_killedboolean

true when the kernel killed the process for memory.

recoveredboolean

true when the target is running again.

sourcestring

Where the incident was detected.

proxmox_classstring

The failure class, for a Proxmox guest.

proxmox_statestring

The guest state, for a Proxmox guest.

crash_analysisobject
flappingobject