Create and manage Datadog SLOs programmatically via the SLOs API

domain: docs.datadoghq.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate requests with DD-API-KEY and DD-APPLICATION-KEY headers using YOUR_API_KEY and YOUR_APP_KEY
  2. POST to /api/v1/slo with a JSON body containing type (metric or monitor), name, description, thresholds array (target, warning, timeframe), and the query or monitor_ids
  3. For a metric-based SLO supply numerator and denominator DataDog metric queries in the query object; for a monitor-based SLO supply an array of monitor IDs
  4. GET /api/v1/slo/{slo_id}/history?from_ts=&to_ts= to retrieve historical SLO status and remaining error budget
  5. PATCH /api/v1/slo/{slo_id} to update thresholds or description without recreating the SLO
  6. Use GET /api/v1/slo?ids= to list SLOs and pipe results into a dashboard widget using the SLO widget type in the Datadog dashboard API

Known gotchas

Related routes

Define a composite SLO combining availability and latency using Datadog SLO API
datadoghq.com · 6 steps · unrated
Create and manage Datadog dashboards as code using the datadog_dashboard Terraform resource
registry.terraform.io · 6 steps · unrated
Write and publish SLO reports and error budget policy documentation via Datadog API
datadoghq.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans