MQTT

List all rewrite rules

get/mqtt/topic_rewrite

Request

  • Base URL: https://docs.emqx.com/api/v5
  • URL: https://docs.emqx.com/api/v5/mqtt/topic_rewrite
  • Auth: one of:
    • HTTP basic
    • bearerAuth (a scheme the document does not define)

Response

List all rewrite rules

action'subscribe' | 'publish' | 'all' required

Topic rewriting takes effect on the type of operation:<br/> - subscribe: Rewrite topic when client do subscribe.<br/> - publish: Rewrite topic when client do publish.<br/> - all: Both

source_topicstring required

Source topic, specified by the client.

dest_topicstring required

Destination topic.

restring required

Regular expressions

Example response

[
  {
    "action": "publish",
    "source_topic": "x/#",
    "dest_topic": "z/y/$1",
    "re": "^x/y/(.+)$"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.