v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-261319281.7 MB

Get Queue Statistics

Get statistics about the work queue for an environment.

get/v1/environments/{environment_id}/work/stats?beta=true

Path parameters

environment_idstring required

Headers

anthropic-betastring

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

The version of the Claude API you want to use.

Read more about versioning and our version history here.

x-api-keystring nullable
authorizationstring nullable

Response

Successful Response

depthinteger required

Number of work items waiting to be picked up (lag from consumer group)

oldest_queued_atstring nullable required

RFC 3339 timestamp of oldest item in the work stream (includes both queued and pending items), null if stream empty

pendinginteger required

Number of work items being processed (polled but not acknowledged)

type'work_queue_stats' required

The type of object

workers_pollinginteger nullable required

Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests.