레퍼런스HTTP APIAgents

Point the agent at a release (compare-and-swap)

POST
/v1/agents/{id}/activate

expected_revision is the agent's current activation_revision (-1 before the first activation); a stale one answers 409 REVISION_CONFLICT. Sending the same activation again is a no-op with a null receipt_id. A release whose runtime profile changed since answers 409 PROFILE_DIGEST_MISMATCH and has to be released again; one whose profile the operator blocked answers 409 PROFILE_BLOCKED. A release whose card names a credential not bound to the agent answers 409 CREDENTIAL_UNBOUND with the missing names in details.missing (ActivationCredentialUnboundDetails). Sessions already pinned keep their release.

Auth: cookie session only; no scope. Idempotency-Key: ignored.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Path Parameters

id*string

The agent's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Request Body

application/json
  1. body
release_id*string
Length1 <= length <= 128
expected_revision*integer
Range-1 <= value <= 2147483647

Response Body

Success

application/json
  1. response
active_release_id*string
Length1 <= length <= 128
previous_release_id*|null
activation_revision*integer
Range-1 <= value <= 2147483647
receipt_id*|null
Example Request
curl -X POST 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/activate' \  -H 'Content-Type: application/json' \  -d '{  "release_id": "string",  "expected_revision": -1}'
Example Response
{  "active_release_id": "string",  "previous_release_id": "string",  "activation_revision": -1,  "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7"}