Get an agent
Use it to check an install: status turns from never_connected to online within about a minute of the agent starting.
Authorizations
An organization API key (obs_pub_…) sent as Authorization: Bearer <key>. Each key carries scopes; an endpoint lists the scope it needs.
Path Parameters
Agent id.
Response
ok
Config documents name the agent a metric runs on by this (metrics[].agent).
never_connected: no heartbeat yet (installed agents report within about a minute). online: a heartbeat in the last 90 seconds. offline: it has connected before but has been silent for over 90 seconds. revoked: its key is rejected (console kill switch).
never_connected, online, offline, revoked status is online.
Last heartbeat.
Agent version from its last heartbeat.
Seeded demo agent; nothing runs it.
First heartbeat ever: when the install first connected.
When the running agent process started.
After a graceful key rotation: the old key keeps working until this time. null when no old key is valid.
Metrics assigned to this agent.
Probe types the agent reported running in its last heartbeat.
Samples buffered on the agent, not yet delivered.
Latest OTLP receiver stats, when the agent runs the receiver.
Custom probes registered on the agent (name, description, has_config_schema), from its last heartbeat.
Prometheus base URL recorded for the agent, if it reads PromQL.
Install snippets, one per target: docker (docker run), compose, kubernetes (Secret + Deployment manifest), systemd and binary. Without prometheus_url they are for a probes-only agent. Here with the ${AGENT_KEY} placeholder: the key is only returned by create and rotate-key.
The agent's environment as NAME: value (AGENT_KEY, CLOUD_SERVER_URL, and PROMETHEUS_SERVER_URL for a Prometheus agent), for installs the snippets do not cover, such as an existing Compose file or Helm values. AGENT_KEY is the ${AGENT_KEY} placeholder here.

