Rensei docs
API ReferenceWorker Protocol

Refresh expired runtime JWT

Refresh expired runtime JWT - Rensei REST API operation reference.

POST
/api/workers/{id}/refresh-token

Authorization

headerAuthorizationBearer <rsp_live_* or project-scoped rsk_live_*>

Project-scoped worker registration token. Current handlers accept this only where explicitly listed.

Path Parameters

id*string

Request Body

application/json
  1. body
sessionShimSupported?boolean
sessionShimControllerId?string
Length1 <= length <= 256
sessionShimProtocolMin?integer
sessionShimProtocolMax?integer
Range3 <= value <= 4294967295
sessionShimCapabilities?array<>
Items4 <= items <= 4

Response Body

New runtime token issued.

application/json
  1. response
runtimeToken*string
runtimeTokenExpiresAt*string
Formatdate-time
registrationTokenExpiresAt*|

The presenting registration token's expiry as an ISO timestamp, or null when the key has no expiry.

Formatdate-time
registrationTokenRenewAfter*|

When the daemon should renew the registration token next, or null when the key has no expiry.

Formatdate-time
heartbeatInterval*integer
pollInterval*integer
sessionShim?

Exact non-secret stable-host credential receipt. Adoption revision 0 is valid only while recovering. Hosted activation remains default-off until the relay durable full-host-frame path is deployed.

Example Request
curl -X POST 'https://app.rensei.ai/api/workers/string/refresh-token' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "runtimeToken": "string",  "runtimeTokenExpiresAt": "2019-08-24T14:15:22Z",  "registrationTokenExpiresAt": "2019-08-24T14:15:22Z",  "registrationTokenRenewAfter": "2019-08-24T14:15:22Z",  "heartbeatInterval": 0,  "pollInterval": 0,  "sessionShim": {    "enabled": true,    "state": "recovering",    "workerHostId": "string",    "adoptionRevision": "string",    "controllerId": "string",    "protocolMin": 1,    "protocolMax": 3,    "capabilities": [      "authoritative_snapshot_v2",      "authoritative_snapshot_v2",      "authoritative_snapshot_v2",      "authoritative_snapshot_v2"    ]  }}