API Checks (CLI)

Manage API health checks from the obs CLI. Custom methods, headers, and assertions, plus runs, pause, mute, and delete.

Manage complex API health checks.

obs check create --name "Auth API" --url "https://api.example.com/auth" --method POST \
--description "Signup endpoint" \
--interval "*/5 * * * *" \
--alert-channel-id 12 \
--header "Authorization=Bearer test" --header "X-Trace=ci" \
--assertion '{"type":"status_code","operator":"equals","value":"200"}' \
--assertion '{"type":"json_path","operator":"equals","path":"$.ok","value":"true"}'
obs check list
obs check get <id>
obs check update <id> --description "Signup v2" --header "X-Trace=ci-v2"
obs check runs <id> --limit 10 # Recent executions
obs check run <id> # Trigger a manual run
obs check toggle <id> # Pause or resume execution
obs check toggle-muted <id> # Mute or unmute alerts without pausing
obs check delete <id> -y

Flags: -d, --description, -i, --interval <cron>, --alert-channel-id <id> (repeatable), --no-alerts, --header KEY=VALUE (repeatable), --assertion <json> (repeatable).

Assertion JSON supports these type values: status_code, response_time, json_path (uses path), text_contains, header (uses path). Operators: equals, not_equals, greater_than, less_than, contains, not_contains, exists, regex_match.

See also: the CLI reference overview.

Was this page helpful?