Skip to main content
Work

Get work queue stats

Read queue depth and worker polling statistics for a self-hosted Environment.

GET /api/v1/cloud/environments/{environment_id}/work/stats Returns queue statistics for a self_hosted Environment.

Path parameters

ParameterTypeDescription
environment_idstringEnvironment ID with the env_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_ACCESS_TOKEN

Example request

curl -X GET "https://api.qoder.com/api/v1/cloud/environments/env_019e64e01a137caf953ac2ac7b42ec5c/work/stats" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example response

HTTP 200 OK
{
  "type": "work_queue_stats",
  "depth": 3,
  "pending": 1,
  "oldest_queued_at": "2026-07-01T08:15:01Z",
  "workers_polling": 2
}

Response fields

Returns a Work queue stats object.

Errors

HTTPTypeTrigger
400invalid_request_errorThe Environment is not self_hosted
401authentication_errorPAT or SAT invalid or expired
403permission_errorNot authorized for this operation
404not_found_errorEnvironment not found
See Errors for the full error envelope.

Notes

  • depth counts queued items that are claimable now.
  • pending counts queued items delivered within the recent redelivery window but not yet acknowledged.
  • workers_polling only counts poll requests that included Worker-ID.