---
title: "List sessions"
method: GET
path: "/api/v1/sessions"
tags: ["Sessions"]
---

# List sessions

`GET /api/v1/sessions`

Returns MQTT v3/v5 sessions and active AMQP 0.9.1 connections with
optional filtering by state and client ID prefix. Supports cursor-based
pagination via `page_token`.

## Query parameters

- `state` 'all' | 'connected' | 'disconnected'
- `prefix` string
- `limit` integer
- `page_token` string

## Response `200`

Paginated list of sessions

- ListSessionsResponse
  - `sessions` SessionResponse[]
    - `client_id` string
    - `connection_name` string — Human-readable AMQP 0.9.1 connection name, when provided by the client
    - `state` 'connected' | 'disconnected'
    - `connected` boolean
    - `protocol` 'mqtt3.1' | 'mqtt3.1.1' | 'mqtt5' | 'amqp0.9.1' | 'amqp1.0' | 'unknown'
    - `version` integer — Raw protocol version byte (3, 4, or 5)
    - `clean_start` boolean — MQTT-only session setting
    - `expiry_interval` integer — MQTT-only session expiry interval in seconds (0 = no expiry)
    - `connected_at` string, date-time, nullable
    - `disconnected_at` string, date-time, nullable
    - `receive_maximum` integer — MQTT-only flow control setting
    - `max_packet_size` integer — MQTT-only packet size limit
    - `topic_alias_max` integer — MQTT-only topic alias limit
    - `request_response` boolean — MQTT 5 request/response capability flag
    - `request_problem` boolean — MQTT 5 problem information capability flag
    - `has_will` boolean — MQTT-only flag indicating whether the session has a will message
    - `subscription_count` integer — Number of active MQTT subscriptions or AMQP 0.9.1 consumers
    - `inflight_count` integer — MQTT-only inflight publish count
    - `offline_queue_depth` integer — MQTT-only offline queue depth
    - `subscriptions` SessionSubscription[] — Active MQTT subscriptions or AMQP 0.9.1 consumer filters
      - `filter` string
      - `qos` integer
      - `no_local` boolean
      - `retain_as_published` boolean
      - `retain_handling` integer
      - `consumer_group` string
      - `subscription_id` integer, nullable
  - `next_page_token` string — Cursor for the next page (empty if no more results)

## Other responses

- `400` — Invalid query parameters
- `405` — Method not allowed
- `503` — Broker not available

---

[API](https://skmtc.net/absmach/apis/fluxmq-admin-api.md) · [All operations](https://skmtc.net/absmach/apis/fluxmq-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/absmach/fluxmq-admin-api/revisions/55b06d78c850/schema)
