Appearance
Test Automation
API Address:/v2/cep/enduserapi/automation/test
Request Method:POST
Request Data Type:application/json
Response Data Type:*/*
API Description:Test automation
Request Example:
javascript
{
"actions": [
{
"delayTime": 0,
"deviceKey": "",
"icon": "",
"id": 0,
"name": "",
"productKey": "",
"property": {
"code": "",
"compare": "",
"dataType": "",
"id": 0,
"name": "",
"subName": "",
"subType": "",
"type": "",
"unit": "",
"value": {}
},
"sceneId": "",
"sort": 0,
"type": 0
}
],
"fid": "",
"timeout": 0
}
Request Parameters:
Parameter Name | Description | Request Type | Required | Data Type | Schema |
---|---|---|---|---|---|
cmd | cmd | body | true | Test automation | Test automation |
actions | Trigger actions | true | array | Automation Execution Action | |
delayTime | Delay time in seconds | false | integer | ||
deviceKey | Device DK/Group ID | false | string | ||
icon | Device/Group/Scene icon | false | string | ||
id | false | integer | |||
name | Device/Group/Scene name | false | string | ||
productKey | Product PK/Group PK | false | string | ||
property | Device property | false | Thing Model Property | Thing Model Property | |
code | Thing model identifier | true | string | ||
compare | Comparison operator: > | >= | < | <= | == |
dataType | Data type. Supports: BOOL, ENUM, INT, FLOAT, DOUBLE, Available values: BOOL,DOUBLE,ENUM,FLOAT,INT | true | string | ||
id | Thing model function ID | true | integer | ||
name | Thing model name | true | string | ||
subName | false | string | |||
subType | false | string | |||
type | Thing model type | false | string | ||
unit | Thing model unit | false | string | ||
value | Thing model property comparison value | false | object | ||
sceneId | Scene ID | false | string | ||
sort | Execution action order, starts from 1 and increments | true | integer | ||
type | Execution action type. 1: Delay, 2: Device, 3: Group, 4: Scene | true | integer | ||
fid | false | string | |||
timeout | Test automation timeout (seconds), default 2*60 if not provided | false | integer(int32) | ||
Authorization | header | false | string |
Response Status:
Status Code | Description | Schema |
---|---|---|
200 | OK | ApiResult«long» |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
Response Parameters:
Parameter Name | Description | Type | Schema |
---|---|---|---|
code | integer(int32) | integer(int32) | |
data | integer(int64) | integer(int64) | |
extMsg | string | ||
msg | string |
Response Example:
javascript
{
"code": 0,
"data": 0,
"extMsg": "",
"msg": ""
}