Clusters
Preview

Create an agent runtime and its token

Makes a runtime for the cluster and returns the token it connects to the gateway with. It is shown in this response only; Wardn keeps a hash. The token is the runtime's own, never the operator's. The response holds a secret, so it is never replayed for an `Idempotency-Key`.

POST
/clusters/{clusterId}/agent-runtimes
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

clusterId*string
Formatuuid
Idempotency-Key?string

Makes retries safe. A repeated key with the same request returns the first result and sets Idempotent-Replayed: true. The same key with a different request answers 409 idempotency.key_reused, and while the first request is still running 409 idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack of sign-in or permission are not kept, so a retry runs again.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255

Response Body

The runtime and its token.

application/json
  1. response
runtimeId*string
Formatuuid
token*string

The secret to give the runtime, starting wat_. Shown once.

expiresAt*string

The token stops being accepted at this time unless a runtime has connected with it by then; one hour after it was made.

Formatdate-time
Example Request
curl -X POST 'https://wardn.example.com/api/v1/clusters/497f6eca-6276-4993-bfeb-53cbbbba6f08/agent-runtimes'
Example Response
{  "runtimeId": "f8fedceb-4f2e-4026-b3e7-d1baf36cf8bc",  "token": "string",  "expiresAt": "2019-08-24T14:15:22Z"}