Get Queue Statistics
api/beta/environments/work/stats
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/environments/work/stats Changed · +12 / -15 lines
# Get Queue Statistics ## Path parameters ## Headers ## Returns ## Example ### Response (200) ## Get Queue Statistics ### Path Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: Get Queue Statistics -url: https://platform.claude.com/docs/en/api/beta/environments/work/stats ---- +# Get Queue Statistics -## Get Queue Statistics +**GET** `/v1/environments/{environment_id}/work/stats` -**get** `/v1/environments/{environment_id}/work/stats` - Get statistics about the work queue for an environment. -### Path Parameters +## Path parameters - `environment_id: string` -### Header Parameters +## Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Returns +## Returns -- `BetaSelfHostedWorkQueueStats object { depth, oldest_queued_at, pending, 2 more }` +- `BetaSelfHostedWorkQueueStats object` Statistics about the work queue for an environment.
Number of work items being processed (polled but not acknowledged) + default: 0 + - `type: "work_queue_stats"` The type of object - - `"work_queue_stats"` + default: work_queue_stats - `workers_polling: number or null` Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests. -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: managed-agents-2026-04-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +### Response (200) ```json {