CronWarden

API reference

CronWarden has three HTTP surfaces: check-in endpoints your jobs call, the monitors API for managing monitors as code, and read-only metrics and badge endpoints.

Check-in endpoints

No API key — authentication is the unguessable ping key in the URL. Both GET and POST work.

MethodEndpointPurpose
GET/POST/ping/<key>Successful finish.
GET/POST/ping/<key>/startRun started.
GET/POST/ping/<key>/failRun failed.

Report a value on the success check-in as ?value=<number>, or as { "value": <number> } in a JSON POST body. A non-numeric value is treated as absent. See Reporting a value.

Monitors API

Requires an Authorization: Bearer cw_... API key. Bodies and responses are JSON.

MethodEndpointPurpose
GET/api/v1/monitors/<slug>Fetch a monitor.
PUT/api/v1/monitors/<slug>Create or update (upsert) a monitor.
DELETE/api/v1/monitors/<slug>Delete a monitor.

See Monitors API for the request body and field reference.

Metrics

MethodEndpointPurpose
GET/api/metricsPrometheus-format gauges for the team, Bearer key required.

See Crontab import & Prometheus metrics.

Badges

No authentication — the badge key is a separate, read-only identifier.

MethodEndpointPurpose
GET/badge/<key>.svg | .jsonSingle monitor status.
GET/badge/tag/<key>.svg | .jsonWorst status across a tag.

Status codes

CodeMeaning
200Success (fetch or update).
201Monitor created.
400Invalid request body or schedule.
401Missing, malformed, unknown, or revoked API key.
404No monitor at that slug in your team.