Enable/Disable Automation

Last Updated on : 2024-06-29 01:44:16download

Enable or disable the specified automation rule.

API address

PUT: /v2.0/cloud/scene/rule/state

Request parameter

Parameter nameTypeINRequiredDescription
space_idStringqueryfalseThe ID of the specified space.

Description of body

Parameter nameTypeINRequiredDescription
idsStringbodytrueThe IDs of the specified linkage rules.
is_enableBooleanbodytrueSpecifies whether to enable the specified linkage rule. Valid values:
  • true: Enable the specified linkage rule.
  • false: Disable the specified linkage rule.

Return parameter

Parameter nameTypeDescription
resultBooleanThe returned result.

Request example

PUT: /v2.0/cloud/scene/rule/state?space_id=53IYS**
{
  "ids": "abc1,abc2",
  "is_enable": true
}

Return example

{
    "tid": "****",
    "result": true,
    "t": 1677741828415,
    "success": true
}

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.