POST /metrics/{id}/status
Set status on a manually-managed metric
Request body
{
"status": "healthy",
"note": null
}
Example request
curl -X POST "/api/v1/metrics/{id}/status" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d "{"status":"healthy","note":null}"
Responses
200: ok
400: invalid request
One of:
invalid_json— the body is not valid JSON.invalid_status—statusmust be one ofhealthy,degraded,unhealthy,no_data.invalid_note—notemust be a string when provided.
401: missing or invalid bearer token
title: unauthenticated. No bearer token was sent, or the key is
invalid or revoked. detail distinguishes the two.
403: missing required scope
title: forbidden. The key is valid but does not carry
write:metrics.
404: not found
title: not_found. No metric with that id is available to this
key. A metric owned by another organisation returns the same
response, so a 404 does not confirm that the id is unused.
409: conflicting state
title: not_manual_metric. The metric is probe-driven. Status can
only be set on manual metrics; probed metrics are driven by the
agent.
429: rate limit exceeded
title: rate_limited. A burst or daily limit was exceeded;
detail names which. The body carries retry_after in seconds.
500: internal error
title: internal_error. An unhandled server error. Safe to retry.
Every error is an RFC 7807 problem detail served as
application/problem+json:
{
"type": "https://observer.example/problems/forbidden",
"title": "forbidden",
"status": 403,
"detail": "missing scope: write:metrics"
}
Branch on title, not on detail. See
Errors and status codes for the full
catalogue and the rate-limit headers.