Rensei docs
API ReferenceWorker Protocol

AF-compatible worker heartbeat

Updates `activeCount` on the worker's Redis record and resets its TTL. Returns pending work queue depth.

POST
/api/workers/{id}/heartbeat

Authorization

workerJwt
AuthorizationBearer <token>

Runtime JWT minted by the platform at worker registration. Three-segment dotted string. Claims include {jti, proj, org, sub (=workerId), reg, scope[]}. Use on all post-registration worker endpoints.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/workers/string/heartbeat" \  -H "Content-Type: application/json" \  -d '{    "activeCount": 0  }'
{
  "acknowledged": true,
  "serverTime": "2019-08-24T14:15:22Z",
  "pendingWorkCount": 0
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}