AF-compatible worker heartbeat
Updates `activeCount` on the worker's Redis record and resets its TTL. Returns pending work queue depth.
Authorization
workerJwt 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
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"
}Poll for queued work
Atomically pops and pre-claims work items from the priority queue (ZPOPMIN). Also returns inbox messages for the worker's active sessions. Workers that receive `preClaimed: true` must NOT make a separate claim call. Runtime-JWT callers also receive `gitCredentials` (short-lived GitHub PAT) and optionally `batchWork` (code-survival scan items, gated on the `code-survival-scan` capability).
Refresh expired runtime JWT
Refresh expired runtime JWT - Rensei REST API operation reference.