ReferenceAdmin API
Sessions
MQTT session and AMQP 0.9.1 connection listing and detail
List sessions
Query Parameters
state?string
Filter by session state
Default
"all"Value in
"all" | "connected" | "disconnected"prefix?string
Filter sessions whose client ID starts with this prefix
limit?integer
Maximum number of sessions to return (0 = no limit)
Range
0 <= valuepage_token?string
Cursor token from a previous response's next_page_token
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:8082/api/v1/sessions"{
"sessions": [
{
"client_id": "my-device-001",
"connection_name": "orders-consumer",
"state": "connected",
"connected": true,
"protocol": "mqtt5",
"version": 5,
"clean_start": true,
"expiry_interval": 0,
"connected_at": "2019-08-24T14:15:22Z",
"disconnected_at": "2019-08-24T14:15:22Z",
"receive_maximum": 0,
"max_packet_size": 0,
"topic_alias_max": 0,
"request_response": true,
"request_problem": true,
"has_will": true,
"subscription_count": 0,
"inflight_count": 0,
"offline_queue_depth": 0,
"subscriptions": [
{
"filter": "devices/+/events",
"qos": 1,
"no_local": true,
"retain_as_published": true,
"retain_handling": 2,
"consumer_group": "string",
"subscription_id": 0
}
]
}
],
"next_page_token": "string"
}{
"error": "broker not available"
}{
"error": "broker not available"
}{
"error": "broker not available"
}Session detail
Path Parameters
client_id*string
MQTT client identifier (URL-encoded)
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:8082/api/v1/sessions/string"{
"client_id": "my-device-001",
"connection_name": "orders-consumer",
"state": "connected",
"connected": true,
"protocol": "mqtt5",
"version": 5,
"clean_start": true,
"expiry_interval": 0,
"connected_at": "2019-08-24T14:15:22Z",
"disconnected_at": "2019-08-24T14:15:22Z",
"receive_maximum": 0,
"max_packet_size": 0,
"topic_alias_max": 0,
"request_response": true,
"request_problem": true,
"has_will": true,
"subscription_count": 0,
"inflight_count": 0,
"offline_queue_depth": 0,
"subscriptions": [
{
"filter": "devices/+/events",
"qos": 1,
"no_local": true,
"retain_as_published": true,
"retain_handling": 2,
"consumer_group": "string",
"subscription_id": 0
}
]
}{
"error": "broker not available"
}{
"error": "broker not available"
}{
"error": "broker not available"
}