Broker (API)
Returns a paginated tree of MQTT topics starting from a given prefix with optional pagination.
Query parameters
prefixstringRequiredExample:
The root prefix to start listing from
test/topic
depthintegerOptionalDefault:
Depth to traverse in the topic tree
1
limitinteger · min: 1 · max: 100OptionalDefault:
Maximum number of results to return
100
offsetintegerOptionalDefault:
Offset to start listing from
0
last_nodestringOptionalExample:
Efficient jump to next offset by providing last queried topic node
test/topic/100
Responses
200
List of matched MQTT topics
application/json
400
Problem with query parameters
application/vnd.api+json
404
No matched MQTT topics
application/vnd.api+json
413
Query would result too many nodes, user needs to narrow down the search
application/vnd.api+json
429
Request had to stay in queue for more than 10s or queue already has 10 waiting requests, default rate is 10 per second, max 3 concurrent running request
application/vnd.api+json
500
Query crashed for any reason
application/vnd.api+json
504
Query processing took more than 10s
application/vnd.api+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?