Last updated: July 7, 2026
Use the SLO API
SLOs are created and managed through the Dash0 API using an OpenSLO v1 SLO definition (apiVersion: openslo/v1, kind: SLO). Dash0 implements a subset of the specification.
Authentication
Calls require an Authorization: Bearer <token> header using a Dash0 auth token (format auth_...). Create and manage tokens in Organization Settings › Auth Tokens.
- Creating or updating an SLO requires a token with configuration permission, which only an Admin can grant.
- A token without configuration permission can read SLOs (
GET) but is rejected with403 Forbiddenon create or update.
Endpoints
The SLO API lives on the Dash0 API host and requires a dataset query parameter.
| Method and path | Purpose |
|---|---|
POST /api/slos?dataset={dataset} | Create an SLO |
GET /api/slos?dataset={dataset} | List SLOs |
GET /api/slos/{originOrId}?dataset={dataset} | Read the latest version of an SLO |
PUT /api/slos/{originOrId}?dataset={dataset} | Update an SLO |
DELETE /api/slos/{originOrId}?dataset={dataset} | Delete an SLO |
On POST and PUT requests (which have a body), the dataset query parameter overrides the dash0.com/dataset label in metadata.labels if both are provided.
The base host is region-specific (for example https://api.eu-west-1.aws.dash0.com). See the Dash0 API reference for the current host for your region and the full request and response schema.
The SLO object
1234567891011121314151617181920212223{"apiVersion": "openslo/v1","kind": "SLO","metadata": {"name": "doc-validation-availability","labels": { "team": "platform" }},"spec": {"budgetingMethod": "Occurrences","description": "99.7% of control-plane-api requests complete without an ERROR span status over a rolling 28-day window.","indicator": {"spec": {"ratioMetric": {"counter": true,"good": { "metricSource": { "type": "Prometheus", "spec": { "query": "..." } } },"total": { "metricSource": { "type": "Prometheus", "spec": { "query": "..." } } }}}},"timeWindow": [ { "duration": "28d", "isRolling": true } ],"objectives": [ { "displayName": "control-plane-api: 99.7% server availability", "target": 0.997 } ]}}
Notes:
targetis a fraction in the range[0, 1)(0.997= 99.7%). The equivalenttargetPercentfield (range[0, 100)) is also accepted.apiVersionmust beopenslo/v1andkindmust beSLO. The server assigns the SLO's identity (returned asoriginOrId) and timestamps — do not include them in the request.- The SLI is a
ratioMetricwithcounter: trueand inline PromQL over your telemetry (each query must be a bare vector selector: label matchers only, no functions or aggregations, else a 400); thegoodquery is a subset of thetotalquery.
Supported in the Private Beta
| Capability | Private Beta Behavior |
|---|---|
budgetingMethod: Occurrences | Supported |
| Single objective | Supported |
ratioMetric SLI with inline PromQL (good / total) | Supported |
Rolling 28-day window (duration: "28d" or "4w", isRolling: true) | Supported |
Timeslices / RatioTimeslices budgeting | Rejected with 400 |
| Calendar windows | Rejected with 400 |
Window durations other than 4w/28d | Rejected with 400 |
| More than one objective | Rejected with 400 |
thresholdMetric SLIs | Rejected with 400 |
indicatorRef (top-level or per-objective) | Rejected with 400 |
Composite objectives (compositeWeight, per-objective indicator) | Rejected with 400 |
Per-objective threshold fields (op / value) | Rejected with 400 |
timeSliceTarget / timeSliceWindow | Rejected with 400 |
metricSource.metricSourceRef | Rejected with 400 — inline the query instead |
alertPolicies | Accepted but ignored (configure alerting with check rules) |
Errors
400 Bad Request— the definition uses a capability that is not supported in the Private Beta (the message names the capability).403 Forbidden— the token lacks configuration permission.