Rules
Update a Rule
Update a rule by given Id to all nodes in the cluster
put/rules/{id}
Request
- Base URL: https://docs.emqx.com/api/v5
- URL: https://docs.emqx.com/api/v5/rules/{id}
- Auth: one of:
- HTTP basic
- bearerAuth (a scheme the document does not define)
Path parameters
idstring required
Request body
Example request
{
"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": {}
}Response
Example response
{
"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": {}
}Changes
No recorded changes to this operation across all 1 revision of this API.