Query Automation List

Last Updated on : 2023-07-06 08:27:07download

Query a list of automations on the pages.

API address

GET: /v2.0/iot-03/automations

Request parameter

Parameter nameTypeINRequiredDescription
page_noIntegerqueryfalseThe page number. Default value: 10.
page_sizeIntegerqueryfalseThe number of items returned on each page. The value ranges from 1 to 100. Default value: 20.

Return parameter

Parameter nameTypeDescription
resultAutomationsResThe returned result.

Description of result

Parameter nameTypeDescription
page_noIntegerThe page number.
page_sizeIntegerThe number of items returned on each page.
dataListThe list of data.
totalLongThe total number of items to be returned.

Description of data

Parameter nameTypeDescription
nameStringThe name of a specified automation.
statusIntegerThe status of automation.Valid values:
  • 0: disabled.
  • 1: enabled.
create_timeLongThe time when it is created.
modify_timeLongThe last update time.
automation_idStringThe ID of a specified automation.
automation_typeStringThe type of automation. Valid values:
  • local: local automation.
  • lan: automation over LAN.
  • cloud: automation in the cloud.

Request example

GET: /v2.0/iot-03/automations

Return example

{
    "result": {
        "data": [
            {
                "create_time": 1635389147428,
                "modify_time": 1635389264298,
                "automation_id": "L7lYM2ZEsonW****",
                "automation_type": "cloud",
                "name": "This is an automation",
                "status": 0
            }
        ],
        "page_no": 1,
        "total": 100,
        "page_size": 20
    },
    "t": 1635389462960,
    "success": true
}

Error code

For more information, see error code.