Admin

Read the global dispatcher kill-switch state

Returns the watcher's current Active() reading and the configured sentinel file path. Requires admin role per the same auth.RequireAdmin middleware that gates /api/v1/admin/ping (#18).

Lag note. The active field reflects the watcher's in-memory state, which is updated on a 5 s poll cadence. An out-of-band file touch/rm issued via host shell may take up to 5 s to propagate. REST-driven flips (POST/DELETE on this same path) propagate within milliseconds because the handler bypasses the poll and updates after writing the file.

Returns 503 {"error":"kill switch not configured"} when the dispatcher is running with KILL_SWITCH_FILE unset (the watcher is the no-op Disabled service).

get/api/v1/admin/kill-switch

Request

  • Base URL: https://api.uptimemonitoring.com
  • URL: https://api.uptimemonitoring.com/api/v1/admin/kill-switch
  • Auth: HTTP bearer

Response

Current kill-switch state.

activeboolean required

Whether the global kill switch is currently engaged. Reflects the watcher's in-memory state, which is updated on a 5 s poll cadence (out-of-band flips can lag up to 5 s; REST-driven flips propagate within milliseconds).

sentinel_pathstring required

Absolute path of the sentinel file the watcher is polling — the value of KILL_SWITCH_FILE at process start.

Example response

{
  "active": true,
  "sentinel_path": "/var/run/um/killswitch"
}

Changes

No recorded changes to this operation across all 1 revision of this API.