Query Linkage Rules

Last Updated on : 2024-06-29 02:03:07download

Based on the space ID, query a list of linkage rules in the specified space.

API address

GET: /v2.0/cloud/scene/rule

Request parameter

Parameter nameTypeINRequiredDescription
space_idStringquerytrueThe ID of the specified space.
page_sizeIntegerqueryfalseThe number of items returned on each page.
page_noIntegerqueryfalseThe page number.
typeStringqueryfalseThe query type.

Return parameter

Parameter nameTypeDescription
resultPagedVOThe returned result.

Description of result

Parameter nameTypeDescription
listListThe list of linkage rules.
has_moreBooleanSpecifies whether to return the next page.
totalLongThe total number of the specified linkage rules.

Description of list

Parameter nameTypeDescription
idStringThe ID of the specified linkage rule.
statusStringThe status. Valid values:
  • enable: Enable the specified linkage rule.
  • disable: Disable the specified linkage rule.
running_modeStringThe operation mode. Valid values:
  • local: local linkage.
  • lan: linkage over LAN.
  • cloud: linkage in the cloud.
space_idStringThe ID of the specified space that is associated with the linkage rule.
nameStringThe name of the specified linkage rule.
typeStringThe type of linkage. Valid values:
  • scene: tap-to-run.
  • automation: automation.

Request example

GET: /v2.0/cloud/scene/rule?space_id=150***&page_size=2&page_no=1&type=automation

Return example

    "tid": "***",
    "result": {
        "list": [
                "type": "automation",
                "running_mode": "cloud",
                "name": "Linkage Test 1",
                "id": "***",
                "space_id": "150***",
                "status": "enable"
                "type": "automation",
                "running_mode": "cloud",
                "name": "Linkage Test 2",
                "id": "***",
                "space_id": "150***",
                "status": "enable"
        "total": 2,
        "has_more": false
    "t": 1678073560814,
    "success": true

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.