deleteTopic

JSON MQ "deleteTopic" action deletes an MQTT topic

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 "preserve" property determines how data, if any, that is associated with an integration table or MQTT topic is preserved. It defaults to "data".

Possible values:
  • "data"
    • "data" is the default value, it preserves the entire table and its records.
  • "nothing"
    • "nothing" removes the table and its data.

Optional with default of "data"

string enum

"data"

"nothing"

topic

The "topic" property specifies the unique, user-defined name for the topic.

  • The "topic" name is typically less than 150 characters.
  • The "topic" name will be used in all subsequent references to the topic, such as when re-configuring or deleting the topic.

 

Optional with default of "" string 1 to 65,500 bytes