The "deleteTopic" action deletes an MQTT topic.
Important
"deleteTopic"preserves nothing about a topic. This action cannot be undone. It deletes a topic’s configuration and, optionally, its messages and the table that stores its messages.
Request examples
Minimal
{
"apiVersion": "1.0",
"action": "deleteTopic",
"params": {
"topic": "test/topic1"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Maximal
{
"api": "mq",
"apiVersion": "1.0",
"requestId": "2",
"action": "deleteTopic",
"params": {
"topic": "test/topic2",
"preserve": "data"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Note If the target object does not exist, the response returns success, and the debug property contains a warning that the object was not found.
Minimal
{
"result": {},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}Maximal
{
"result": {
},
"requestId": "2",
"debugInfo": {
"request": {
"api": "mq",
"action": "deleteTopic",
"params": {
"topic": "acmefactory/line1/station1/acidbath/telemetry",
"preserve": "data"
},
"apiVersion": "1.0",
"requestId": "2",
"debug": "max",
"authToken": "replaceWithAuthTokenFromCreateSession"
},
"warnings": [
{
"code": 14229,
"message": "Not able to delete topic [acmefactory/line1/station1/acidbath/telemetry] because it was not possible to retrieve its persistence information"
}
]
},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
preserve |
The Possible values:
|
Optional with default of |
string enum |
|
topic |
The
|
Optional with default of ""
|
string | 1 to 65,500 bytes |