Skip to main content
POST
Issue a new agent key (shown once) with install commands

Authorizations

Authorization
string
header
required

An organization API key (obs_pub_…) sent as Authorization: Bearer <key>. Each key carries scopes; an endpoint lists the scope it needs.

Path Parameters

id
string<uuid>
required

Agent id.

Body

application/json
invalidate_immediately
boolean
default:false

true: the old key stops working now (a leaked key). Default: it keeps working for 24 hours so the new one can be deployed first.

Response

ok

agent
object
required

The agent, without its placeholder install and env (the ones below carry the key).

agent_key
string
required

The agent key (obs_live_…). Returned only in this response; Observer stores a hash and cannot show it again.

install
object
required

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. The agent key is filled in.

env
object
required

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. The agent key is filled in.