The "describeTopics" action returns all available information about specified MQTT topics.
Request examples
Minimal
{
"apiVersion": "1.0",
"action": "describeTopics",
"params": {
"topics": [
"test/topic1"
]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Minimal
{
"result": {
"data": [
{
"name": "test/topic1",
"creationTime": "2024-02-01T23:47:45.814",
"messageCount": 2,
"lastMessageTime": "2024-02-01T23:47:51.716",
"averageMessagesPerMinute": 0,
"averageMessagesPerHour": 0,
"averageMessagesPerDay": 0,
"subscriberList": [
{
"topicExpression": "#",
"connectionList": [
{
"connection": {
"clientId": "mqtt-explorer-001",
"ipaddress": "127.0.0.1",
"port": 35646,
"mqttProtocol": 4,
"keepAliveSeconds": 60,
"status": "Connected with clean flag = 1",
"connectionTime": "2024-01-31T17:31:19"
},
"qos": 0
}
]
},
{
"topicExpression": "test/#",
"connectionList": [
{
"connection": {
"clientId": "NodeREDSecure",
"ipaddress": "127.0.0.1",
"port": 36115,
"mqttProtocol": 4,
"keepAliveSeconds": 60,
"status": "Connected with clean flag = 1",
"connectionTime": "2024-01-31T17:31:30"
},
"qos": 1
}
]
}
],
"persistence": {
"topic": "test/topic1",
"mqttPayloadType": "json",
"databaseConnectionString": "FAIRCOMS",
"databaseUserName": "admin",
"databaseName": "faircom",
"tableName": "mqtt_msg_test_topic1",
"ownerName": "admin",
"threads": 1,
"tableAutoTimeStamp": true,
"tableAutoTimeStampIndex": true,
"tableReplicationReady": true,
"retentionPolicy": "autoPurge",
"retentionUnit": "week",
"retentionPeriod": 4,
"storeAndForward": true,
"maxDeliveryRatePerSecond": 0,
"newSubscriberDeliveryMode": "default",
"newSubscriberMaxDeliveredMessages": 0,
"retrySeconds": 20,
"outputPayloadField": "source_payload",
"label": {
"id": 1,
"group": "test",
"name": "test",
"value": null,
"enum": null,
"sequence": 0,
"deprecated": false,
"description": null,
"metadata": null
}
}
}
]
},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
topics |
The |
Optional with default of []
|
array |
0 or more topic strings |
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
data |
The |
array of objects | The action determines its contents. |
|
data .averageMessagesPerDay |
The "averageMessagesPerDay" property describes how many messages the specified topic publishes per day on average. |
integer | The average number of messages published per day |
|
data .averageMessagesPerHour |
The "averageMessagesPerHour" property indicates the average number of messages the specified topic publishes per hour. |
integer | The average number of messages published per hour |
|
data .averageMessagesPerMinute |
The "averageMessagesPerMinute" property indicates the average number of messages the specified topic publishes per minute. |
integer | The average number of messages published per minute |
|
data .creationTime |
The "creationTime" property details the date and time when the specified topic was created. This property stores the creation date in an ISO 8601 timestamp. |
timestamp | An ISO 8601 timestamp |
|
data .lastMessageTime |
The "lastMessageTime" property specifies the last time that a message was published by the topic. |
timestamp | An ISO 8601 timestamp |
|
data .messageCount |
The "messageCount" property defines the total number of messages published by the topic. |
BigInteger |
0 to 9223372036854775807
|
|
data .name |
The The The |
string | 1 to 64 bytes |
|
data .persistence |
The "persistence" property defines the parameters of the persistence table. |
object |
|
|
data persistence .databaseConnectionString |
The "databaseConnectionString" property specifies the connection string for the database that holds the persistence table. |
string | No limits |
|
data persistence .databaseName |
The
|
string | 1 to 64 bytes |
|
data persistence .databaseUserName |
The "databaseUserName" property specifies the user name of the account logged into the database that holds the persistence table. |
string | 0 to 64 bytes |
|
data persistence .label |
The A label is a tag that you can add to some objects, such as an MQTT topic or session. You can use list actions such as The |
object | "label": {
"group": "group name",
"name": "label name"
} |
|
data persistence label .deprecated |
The |
Boolean |
|
|
data persistence label .description |
The Markdown is a good language for formatting description text. You must ensure the text is compatible with a JSON string. For example, you must escape a double quote character using the backslash character:
In the Thing API, It defaults to
|
string | 1 to 65,500 bytes |
|
data persistence label .enum |
The
|
smallint |
-32768 to 32767
|
|
data persistence label .group |
The The If the When you assign a group name to a label, the server automatically checks whether the group name exists in the list of groups returned by the "listLabelGroups" action. If the group name does not exist, the server adds the group name to the list. When you rename a group assigned to a label, the server automatically adds a new group name to the list and removes the previous group name if no other label uses it.
|
string | 1 to 64 bytes |
|
data persistence label .id |
The |
integer |
|
|
data persistence label .metadata |
The |
JSON | 0 to 65,500 bytes |
|
data persistence label .name |
The The The
|
string | 1 to 64 bytes |
|
data persistence label .sequence |
The |
float | Any floating point or integer number. |
|
data persistence label .value |
The
When you use the
In Key-Value actions, the |
JSON | 0 to 65,500 bytes |
|
data persistence .maxDeliveryRatePerSecond |
The
|
integer |
0 to 2147483647
|
|
data persistence .mqttPayloadType |
The "mqttPayloadType" property specifies the variant type format of the "source_payload" field. For more details, see mqttPayloadType. |
string enum |
|
|
data persistence .newSubscriberDeliveryMode |
The
|
string enum |
|
|
data persistence .newSubscriberMaxDeliveredMessages |
The
|
integer |
-1 to 2147483647
|
|
data persistence .outputPayloadField |
The
This makes it possible for the output from any transform to be used as the payload delivered to subscribers. |
string |
"source_payload" or a user-defined field |
|
data persistence .ownerName |
The "ownerName" property identifies the user who owns an object (see Object owner). |
string | 0 to 64 bytes |
|
data persistence .retentionPeriod |
The
When partitions are auto-purged, some data are maintained Automatically purging data is important to ensure that retained data does not consume all storage and shut down the computer. The default value of 4 weeks allows FairCom's servers to store 1 TB of messages when 200 topics send one 2K message per second.
|
integer |
1 to 100
|
|
data persistence .retentionPolicy |
The Possible values:
|
string enum |
|
|
data persistence .retentionUnit |
Each time this unit cycles, FairCom purges expired messages. For example, if you want a week's worth of messages to be purged once a week, set
|
string enum |
|
|
data persistence .retrySeconds |
The
|
integer |
1 to 65535
|
|
data persistence .storeAndForward |
|||
|
data persistence .tableAutoTimeStamp |
|||
|
data persistence .tableAutoTimeStampIndex |
|||
|
data persistence .tableName |
The See table name in System specifications for the table naming requirements and limitations. |
string | 1 to 64 bytes |
|
data persistence .tableReplicationReady |
The "tableReplicationReady" property enables the transaction log on the persistence table. Transaction logs must be enabled before a table can be replicated. |
Boolean |
|
|
data persistence .threads |
The
|
integer |
|
|
data persistence .topic |
The |
string | A topic name between 1 and 65,500 bytes |
|
data .subscriberList |
|||
|
data subscriberList .connectionList |
|||
|
data subscriberList connectionList .connection |
|||
|
data subscriberList connectionList connection .clientId |
|||
|
data subscriberList connectionList connection .connectionTime |
|||
|
data subscriberList connectionList connection .ipaddress |
The "ipAddress" property specifies the PLC/Equipment IPV4 Address. |
string | A valid IP address |
|
data subscriberList connectionList connection .keepAliveSeconds |
The |
integer | No limit |
|
data subscriberList connectionList connection .mqttProtocol |
The "mqttProtocol" property specifies the version of MQTT protocol to use in your session. |
string enum |
|
|
data subscriberList connectionList connection .port |
The |
integer | an integer port number |
|
data subscriberList connectionList connection .status |
The
When the
To create, alter, and list inactive items, set the |
string enum |
|
|
data subscriberList connectionList .qos |
|||
|
data subscriberList .topicExpression |