Apply config
Validates the whole document, then upserts the services, metrics, SLOs and pages it names. Use ?dryRun=true to get the diff without changing anything (run it on pull requests); ?prune=true also deletes config-managed objects absent from the document. The body is YAML (text/yaml or text/plain) or JSON, at most 1 MB.
Top-level keys other than apiVersion, metrics, services and pages are ignored and reported in warnings (for example incidents, which are managed through the API). Warnings never block an apply.
A metric’s agent is the name of an Observer Agent of the organization (GET /agents; create one with POST /agents). An unknown name, or one two agents share, fails validation. A metric whose source runs on an agent but names none is accepted with a warning: it gets no data until an agent is assigned. Each metric entry in diff shows the agent it resolved to.
Pages keep the per-metric settings edited in the console (public label, uptime bar); the document controls which metrics a page shows, their group and order. A page entry in diff lists metrics added, removed and changed.
A heartbeat metric (source_type: heartbeat) must not name an agent; the document fails validation if it does. Its thresholds are ignored, because they derive from period_seconds and grace_seconds. The ping URL is never part of the document (GET /metrics//heartbeat returns it to keys with write:config).
Authorizations
An organization API key (obs_pub_…) sent as Authorization: Bearer <key>. Each key carries scopes; an endpoint lists the scope it needs.
Query Parameters
Plan only: return the diff and change nothing. dry_run is accepted too.
Also delete config-managed objects that the document no longer names.
Body
The ConfigDocument as YAML.
Response
Applied, or planned when dryRun is set. warnings is always present (empty when there is nothing to report); each entry is { path, message }: ignored top-level keys, and agent-run metrics that name no agent.

