Rules

List Rules

List all rules

get/rules

Request

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

Query parameters

enableboolean

Filter enable/disable rules

fromstring

Filter rules by from(topic), exact match

like_idstring

Filter rules by id, Substring matching

like_fromstring

Filter rules by from(topic), Substring matching

like_descriptionstring

Filter rules by description, Substring matching

match_fromstring

Filter rules by from(topic), Mqtt topic matching

pageinteger

Page number of the results to fetch.

limitinteger

Results per page(max 1000)

Response

Example response

{
  "data": [
    {
      "id": "293fb66f",
      "created_at": "2021-12-01T15:00:43.153+08:00",
      "name": "foo",
      "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1",
      "actions": [
        "webhook:my_webhook",
        {
          "args": {
            "payload": "${payload}",
            "topic": "t/1"
          },
          "function": "republish"
        },
        {
          "function": "console"
        }
      ],
      "description": "Some description",
      "metadata": {}
    }
  ],
  "meta": {
    "page": 1,
    "limit": 50
  }
}

Changes

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