Broker (API)

List MQTT topics under a prefix

get

Returns a paginated tree of MQTT topics starting from a given prefix with optional pagination.

Query parameters
prefixstringRequired

The root prefix to start listing from

Example: test/topic
depthintegerOptional

Depth to traverse in the topic tree

Default: 1
limitinteger · min: 1 · max: 100Optional

Maximum number of results to return

Default: 100
offsetintegerOptional

Offset to start listing from

Default: 0
last_nodestringOptional

Efficient jump to next offset by providing last queried topic node

Example: test/topic/100
Responses
200

List of matched MQTT topics

application/json
get
GET /api/v2/mqtt/topics?prefix=test%2Ftopic HTTP/1.1
Host: 
Accept: */*
{
  "jsonapi": {
    "version": "text"
  },
  "meta": {
    "prefix": "test/topic",
    "depth": 1,
    "limit": 10,
    "offset": 0,
    "total": 312074,
    "last_node": "test/topic/100"
  },
  "data": [
    {
      "id": "test/100002",
      "type": "topic-nodes",
      "attributes": {
        "name": "100002",
        "isLeaf": true,
        "childCount": 1
      }
    }
  ],
  "included": []
}

Last updated

Was this helpful?