Sessions

Rotate an agent-bound worker token

Changed on

Returns a new token once. The previous token keeps working for graceSec (default 300), then expires. Use revoke for a token that must stop now.

post/api/agents/{id}/token/rotate

Request

  • Base URL
    http://localhost:3013
  • URL
    http://localhost:3013/api/agents/{id}/token/rotate
  • Auth
    HTTP bearer

Path parameters

idstring required

Request body

graceSecinteger
ttlMsinteger

Token lifetime in ms. Omit for the default (no expiry).

Response

New worker token

agentIdstring required
tokenIdstring required
plaintextstring required
expiresAtstring nullable required

null when the token does not expire

previousExpiresAtstring required

Changes