Topic Explorer (API)

Get immediate children of a prefix

get

Returns the child nodes for a given prefix.

Authorizations
Query parameters
prefixstringOptional

Path prefix (URL-encoded). Needs to be built by joining previous levels with '/'. If omitted, root level is assumed.

Responses
200

List of child nodes wrapped in JSON:API envelope.

application/json
Responseall of
get
/v2/mqtt/topics/levels
GET /api/v2/mqtt/topics/levels HTTP/1.1
Host: localhost
Accept: */*
{
  "jsonapi": {
    "version": "1.1"
  },
  "data": {
    "children": [
      {
        "name": "Germany",
        "has_more": true
      },
      {
        "name": "France",
        "has_more": true
      }
    ]
  },
  "meta": {}
}
get

Returns all topics matching a given prefix.

Authorizations
Query parameters
prefixstringRequired

Path prefix to search for (URL-encoded).

Responses
200

Search results wrapped in JSON:API envelope.

application/json
Responseall of
get
/v2/mqtt/topics/search
GET /api/v2/mqtt/topics/search?prefix=text HTTP/1.1
Host: localhost
Accept: */*
{
  "jsonapi": {
    "version": "1.1"
  },
  "data": [
    "Earth/Germany/Berlin/",
    "Earth/Germany/Hamburg"
  ],
  "meta": {}
}

Last updated

Was this helpful?