---
title: "Fetch stats for a queue"
method: POST
path: "/v1/queue.stats"
tags: ["Querator V1"]
---

# Fetch stats for a queue

`POST /v1/queue.stats`

Retrieve statistics about a queue. Queue stats provide information on the health of a partition in a queue

## Request body

- QueueStatsRequest
  - `queue_name` string, required

## Response `200`

- QueueStatsResponse
  - `queue_name` string, required
  - `logical_queues` QueueLogicalStats[], required
    - `average_leased_age` string, required — The average age of leased items in the partition
    - `produce_waiting` integer, required — The number of `/queue.produce` requests currently waiting to be processed by the sync loop
    - `lease_waiting` integer, required — The number of `/queue.lease` requests currently waiting to be processed by the sync loop
    - `complete_waiting` integer, required — the number of `/queue.complete` requests currently waiting to be processed by the sync loop
    - `in_flight` integer, required — The total number of requests currently in flight waiting for responses from the sync loop
    - `partitions` QueuePartitionStats[], required
      - `partition` integer, required — The partition the stats are for
      - `total` integer, required — Total is the number of items in the partition
      - `total_leased` integer, required — The number of items in the partition that are in leased state
      - `average_age` string, required — The average age of all items in the partition

## Changes

- **2025-06-05** `db1e2b747f3c` — 1 breaking
  - removed the required property `logical_queues/items/lease_blocked` from the response with the `200` status
- **2025-04-21** `3de0078c9268` — 4 breaking, 4 info
  - removed the required property `logical_queues/items/average_reserved_age` from the response with the `200` status
  - removed the required property `logical_queues/items/partitions/items/total_reserved` from the response with the `200` status
  - removed the required property `logical_queues/items/reserve_blocked` from the response with the `200` status
  - removed the required property `logical_queues/items/reserve_waiting` from the response with the `200` status
  - …4 more
- **2024-09-15** `ba3240950bb2` — 3 breaking, 5 info
  - removed the required property `logical_queues/items/average_leased_age` from the response with the `200` status
  - removed the required property `logical_queues/items/lease_waiting` from the response with the `200` status
  - removed the required property `logical_queues/items/partitions/items/total_leased` from the response with the `200` status
  - request body became optional
  - …4 more

[Change history](https://skmtc.dev/kapetan-io/apis/querator-api/changes/v1/queue.stats/post.md)

---

[API](https://skmtc.dev/kapetan-io/apis/querator-api.md) · [All operations](https://skmtc.dev/kapetan-io/apis/querator-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kapetan-io/querator-api/revisions/00a535961201/schema)
