Skip to content

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 NameDescriptionRequest TypeRequiredData TypeSchema
cmdcmdbodytrueTest automationTest automation
  actionsTrigger actionstruearrayAutomation Execution Action
    delayTimeDelay time in secondsfalseinteger
    deviceKeyDevice DK/Group IDfalsestring
    iconDevice/Group/Scene iconfalsestring
    idfalseinteger
    nameDevice/Group/Scene namefalsestring
    productKeyProduct PK/Group PKfalsestring
    propertyDevice propertyfalseThing Model PropertyThing Model Property
      codeThing model identifiertruestring
      compareComparison operator: >>=<<===
      dataTypeData type. Supports: BOOL, ENUM, INT, FLOAT, DOUBLE, Available values: BOOL,DOUBLE,ENUM,FLOAT,INTtruestring
      idThing model function IDtrueinteger
      nameThing model nametruestring
      subNamefalsestring
      subTypefalsestring
      typeThing model typefalsestring
      unitThing model unitfalsestring
      valueThing model property comparison valuefalseobject
    sceneIdScene IDfalsestring
    sortExecution action order, starts from 1 and incrementstrueinteger
    typeExecution action type. 1: Delay, 2: Device, 3: Group, 4: Scenetrueinteger
  fidfalsestring
  timeoutTest automation timeout (seconds), default 2*60 if not providedfalseinteger(int32)
Authorizationheaderfalsestring

Response Status:

Status CodeDescriptionSchema
200OKApiResult«long»
201Created
401Unauthorized
403Forbidden
404Not Found

Response Parameters:

Parameter NameDescriptionTypeSchema
codeinteger(int32)integer(int32)
datainteger(int64)integer(int64)
extMsgstring
msgstring

Response Example:

javascript
{
	"code": 0,
	"data": 0,
	"extMsg": "",
	"msg": ""
}