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
anthropic-workspace-idstring

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

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.

Changes