---
tags:
  - inspect
---
# GET /api/admin/inspect-sched-q/v1


!!! info
    This page was generated by extracting information from a JSON Schema
    data file for the API.  It may be missing some information, or otherwise
    suggest approximate or placeholder values based on information in the
    schema file; this is due to limitations on how that data is extracted
    from the underlying Rust code and into the JSON Schema, and then again
    from there and into these docs.

Retrieve information about messages in a scheduled queue.

This API endpoint is used by the [kcli inspect-sched-q](../../kcli/inspect-sched-q.md) command.

## Query Parameters
  * `queue_name` - required `string`. The name of the scheduled queue
  * `want_body` - optional `boolean`. If true, return the message body in addition to the
    metadata
  * `limit` - optional nullable `integer`. Return up to `limit` messages in the queue sample.
    Depending on the strategy configured for the queue,
    messages may not be directly reachable via this endpoint.
    If no limit is provided, all messages in the queue will
    be sampled.

## Responses
### Status 200
Obtained queue information


`Content-Type: application/json`


This is an object value, with the following properties:


  * `delayed_metric` - required `integer`. 

  * `last_changed` - required `string` (`date-time`). 

  * `messages` - required array of [InspectMessageV1Response](schemas/InspectMessageV1Response.md). 

  * `now` - required `string` (`date-time`). 

  * `num_scheduled` - required `integer`. 

  * `queue_config` - required `object`. 

  * `queue_name` - required `string`. 

### Examples
```json
{
  "delayed_metric": 42,
  "last_changed": "1990-12-31T23:59:60Z",
  "messages": [
    {
      "id": "d7ef132b5d7711eea8c8000c29c33806",
      "message": {
        "data": "From: user@example.com\nSubject: Hello\n\nHello there",
        "due": "1990-12-31T23:59:60Z",
        "meta": {},
        "num_attempts": 42,
        "recipient": "recipient@example.com",
        "scheduling": {},
        "sender": "sender@sender.example.com"
      }
    }
  ],
  "now": "1990-12-31T23:59:60Z",
  "num_scheduled": 42,
  "queue_config": {},
  "queue_name": "campaign_name:tenant_name@example.com"
}
```
