Objectives
/api/v1/organizations/{org_id}/objectivesEvery Objective in the active org, name-ordered, each carrying its current budget snapshot from a single batched ClickHouse call — see this module's docstring for why that call is not per-row.
Authorization
HTTPBearer In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/objectives"{ "items": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "is_enabled": true, "service_id": "641e839f-864e-4cce-98f9-40f6cbb3e9e0", "monitor_id": "ff93e0f3-22fc-4809-8875-a2d24a9803b1", "sli_kind": "string", "sli_source": "string", "latency_threshold_ms": 0, "target_ratio": "string", "window": "string", "manifest_path": "string", "commit": "string", "budget": { "sli_ratio": 0, "budget_consumed": 0, "budget_remaining": 0, "burn_rate": 0, "as_of": "2019-08-24T14:15:22Z" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}/api/v1/organizations/{org_id}/objectives/{objective_id}One Objective by id, within the active org, plus its budget series
over its own declared window. An Objective belonging to another org is
indistinguishable from one that does not exist — 404, never 403,
matching ObjectiveRepository.get_by_id's own docstring and
dashboards.py's identical precedent.
Authorization
HTTPBearer In: header
Path Parameters
uuiduuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/objectives/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "is_enabled": true, "service_id": "641e839f-864e-4cce-98f9-40f6cbb3e9e0", "monitor_id": "ff93e0f3-22fc-4809-8875-a2d24a9803b1", "sli_kind": "string", "sli_source": "string", "latency_threshold_ms": 0, "target_ratio": "string", "window": "string", "manifest_path": "string", "commit": "string", "budget": { "sli_ratio": 0, "budget_consumed": 0, "budget_remaining": 0, "burn_rate": 0, "as_of": "2019-08-24T14:15:22Z" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "filters": {}, "alerting": [ {} ], "series": [ { "bucket_start": "2019-08-24T14:15:22Z", "good_events": 0, "valid_events": 0, "sli_ratio": 0, "budget_consumed": 0, "budget_remaining": 0, "burn_rate": 0, "target_ratio": "string", "objective_window": "string", "definition_version": 0 } ]}/api/v1/organizations/{org_id}/objectives/{objective_id}/budget-historyBudget history over a caller-chosen [start, end), which MAY exceed
the Objective's own declared window (#773 AC) — e.g. a 90-day view of a
7d-window Objective. Still 404s on an Objective from another org before
ever touching ClickHouse, matching get_objective above.
Authorization
HTTPBearer In: header
Path Parameters
uuiduuidQuery Parameters
Range start, inclusive (ISO 8601)
date-timeRange end, exclusive (ISO 8601)
date-timeResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/objectives/497f6eca-6276-4993-bfeb-53cbbbba6f08/budget-history?start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z"{ "objective_id": "a5f9b33c-8c7c-450f-8b99-e52aa06d137d", "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "bucket_width_seconds": 0, "points": [ { "bucket_start": "2019-08-24T14:15:22Z", "good_events": 0, "valid_events": 0, "sli_ratio": 0, "budget_consumed": 0, "budget_remaining": 0, "burn_rate": 0, "target_ratio": "string", "objective_window": "string", "definition_version": 0 } ]}