"listTopics"
listTopics lists the names of MQTT topics that the server is tracking.
The "listTopics"
action lists the names of MQTT topics that the server is tracking.
Things to know
You can return a filtered list by specifying a partial name in the
"partialName"
property.You can include additional items in the list by searching for words contained in the item’s metadata.
Use
"describeTopics"
to get detailed information about specific MQTT topics.
Request examples
Minimal request example
{ "api": "mq", "apiVersion": "1.0", "authToken": "anAuthorizationTokenFromTheServer", "requestId": "00000001", "action": "listTopics" }
{ "api": "mq", "apiVersion": "1.0", "authToken": "anAuthorizationTokenFromTheServers", "requestId": "00000026", "action": "listTopics", "params": { "partialName": "acmefactory", "search": null, "dataFormat": "arrays", "skipRecords": null, "maxRecords": 20 } }
Response examples
{ "result": { "data": [ "acmefactory/line1/station1/acidbath/telemetry", ] }, "requestId": "00000020", "errorCode": 0, "errorMessage": "" }
{ "result": { "data": [ "acmefactory/line1/station1/acidbath/telemetry" ] }, "requestId": "00000025", "errorCode": 0, "errorMessage": "" }
"params"
The "params"
property is an object that contains an action's parameters. Each action defines its own required and optional properties.
Property summary
"params"
property summariesProperty | Description | Default | Type | Limits (inclusive) | ||
---|---|---|---|---|---|---|
filters the returned topics by applying partial matches to their names |
| string |
| |||
The "partialName"
property is an optional string that causes the server to include items in the result when the beginning of their names match the "partialName"
value. It defaults to an empty string.
A zero-length string matches all names.
The
"partialName"
property is used to filter results in several actions used to return lists.
"result"
Property summary
"result"
property summariesProperty | Description | Type | Limits (inclusive) |
---|---|---|---|
| contains an array or object that the server returns, such as records returned by a query NoteIt is an empty array when there are no results available. | array | Its contents are determined by the action |