---
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 the partitions in a queue

## Request body

- QueueStatsRequest
  - `queue_name` string, required

## Response `200`

- QueueStatsResponse
  - `queue_name` string, required
  - `logical_queues` QueueLogicalStats[], required
    - `average_reserved_age` string, required — The average age of reserved items in the partition
    - `produce_waiting` integer, required — The number of `/queue.produce` requests currently waiting to be processed by the sync loop
    - `reserve_waiting` integer, required — The number of `/queue.reserve` 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
    - `reserve_blocked` integer, required — The number of reservations which are blocked waiting for new item to enter the queue
    - `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_reserved` integer, required — The number of items in the partition that are in reserved state
      - `average_age` string, required — The average age of all items in the partition

## Changes

- **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/36fb0df413ee/schema)
