Last Updated on : 2024-06-29 02:00:03download
Based on the linkage rule ID, get the details of the specified linkage rule.
GET: /v2.0/cloud/scene/rule/{rule_id}
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
rule_id | String | uri | true | The ID of the specified linkage rule. |
Parameter name | Type | Description |
---|---|---|
result | LinkageResponse | The returned result. |
Description of result
Parameter name | Type | Description |
---|---|---|
id | String | The ID of the specified linkage rule. |
status | String | The status. Valid values:
|
running_mode | String | The operation mode. Valid values:
|
space_id | String | The ID of the specified space that is associated with the linkage rule. |
name | String | The name of the specified linkage rule. |
type | String | The type of linkage. Valid values:
|
decision_expr | String | The condition expression. Valid values:
|
conditions | List | The collection of conditions. |
actions | List | The collection of actions. |
effective_time | EffectiveTime | The effective time. |
Description of effective_time
Parameter name | Type | Description |
---|---|---|
start | String | The start time. |
end | String | The end time. |
loops | String | The cycle when the specified linkage rule is triggered. The value is a seven-digit number consisting of 0 and 1 . 0 means disabled and 1 means enabled. The first digit represents Sunday and the other digits represent Monday to Saturday sequentially. For example, 0011000 represents a scheduled task is executed every Tuesday and Wednesday. |
time_zone_id | String | The ID of the specified time zone. |
Description of conditions
Parameter name | Type | Description |
---|---|---|
entity_id | String | The object ID of the specified condition. |
entity_type | String | The object type of the specified condition. Valid values:
|
code | Integer | The unique code of the specified condition. |
expr | Expr | The calculation expression. |
Description of actions
Parameter name | Type | Description |
---|---|---|
entity_id | String | The object ID of the specified action. |
action_executor | String | The object type of the specified action. Valid values:
|
executor_property | ExecutorProperty | The details of the specified action. |
Description of expr
Parameter name | Type | Description |
---|---|---|
status_code | String | The code of the specified status. This parameter is required when entity_type is device_report . |
comparator | String | The comparison expression. This parameter is required when entity_type is device_report and weather . Valid values:
|
status_value | Object | The value of the specified status. This parameter is required when entity_type is device_report . |
date | String | The date when the specified linkage rule is triggered. |
time | String | The time when the specified linkage rule is triggered. |
loops | String | The cycle when the specified linkage rule is triggered. The value is a seven-digit number consisting of 0 and 1 . 0 means disabled and 1 means enabled. The first digit represents Sunday and the other digits represent Monday to Saturday sequentially. For example, 0011000 represents a scheduled task is executed every Tuesday and Wednesday. |
time_zone_id | String | The ID of the specified time zone. |
weather_code | String | The code of the specified status. This parameter is required when entity_type is weather . |
weather_value | Object | The value of the specified status. This parameter is required when entity_type is weather . |
Description of executor_property
Parameter name | Type | Description |
---|---|---|
function_code | String | The code of the specified instruction. This parameter is required when action_executor is device_issue or device_group_issue . |
function_value | Object | The value of the specified instruction. This parameter is required when action_executor is device_issue or device_group_issue . |
delay_seconds | Integer | The delay time. This parameter is required when action_executor is delay . |
GET: /v2.0/cloud/scene/rule/***
{
"tid": "c4b2df2ebbcc11eda71e169efc83a172",
"result": {
"effective_time": {
"start": "00:00",
"loops": "1111111",
"end": "23:00",
"time_zone_id": "Asia/Shanghai"
},
"type": "automation",
"running_mode": "cloud",
"name": "Linkage Test",
"decision_expr": "or",
"id": "***",
"conditions": [
{
"code": 1,
"entity_id": "***",
"entity_type": "device_report",
"expr": {
"status_code": "switcn_1",
"status_value": "true",
"comparator": "=="
}
}
],
"actions": [
{
"entity_id": "***",
"executor_property": {
"function_value": true,
"function_code": "switch_1"
},
"action_executor": "device_issue"
}
],
"space_id": "150***",
"status": "disable"
},
"t": 1678072367076,
"success": true
}
For more information, see error code.
For more information, see Limits on API Request Frequency.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback