Appearance
Test Scene
Interface Address:/v2/cep/enduserapi/sceneTest
Request Method:POST
Request Data Type:application/json
Response Data Type:*/*
Interface Description:Test Scene
Request Example:
javascript
{
"fid": "",
"isCommon": true,
"sceneInfo": {
"icon": "",
"id": 0,
"metaDataList": [
{
"actionList": [
{
"actionId": 0,
"code": "",
"dataType": "",
"id": 0,
"name": "",
"subName": "",
"subType": "",
"type": "",
"unit": "",
"value": {}
}
],
"deviceKey": "",
"deviceName": "",
"deviceType": 0,
"logoImage": "",
"productKey": ""
}
],
"name": "",
"sceneId": "",
"uid": ""
}
}Request Parameters:
| Parameter Name | Parameter Description | Request Type | Required | Data Type | schema |
|---|---|---|---|---|---|
| cmd | cmd | body | true | Scene Param Req | Scene Param Req |
| fid | Family ID, required when home mode is enabled, otherwise not | false | string | ||
| isCommon | Whether to add to common scenes | false | boolean | ||
| sceneInfo | Scene information | true | Scene Info | Scene Info | |
| icon | Scene icon | false | string | ||
| id | Scene primary key ID | false | integer | ||
| metaDataList | Linkage data | true | array | Linkage Data | |
| actionList | Execute actions | true | array | Execute Action | |
| actionId | Execute action ID | false | integer | ||
| code | Thing model identifier | true | string | ||
| dataType | Thing model data type | true | string | ||
| id | Thing model function ID | true | integer | ||
| name | Thing model function name | true | string | ||
| subName | false | string | |||
| subType | Read/write type | false | string | ||
| type | Thing model function type | true | string | ||
| unit | Thing model unit | false | string | ||
| value | Thing model value | true | object | ||
| deviceKey | Device/Group ID | true | string | ||
| deviceName | Device name/Group name | false | string | ||
| deviceType | Device type, 1: Normal device, 2: Group | true | integer | ||
| logoImage | Scene LOGO | false | string | ||
| productKey | Product KEY | true | string | ||
| name | Scene name | false | string | ||
| sceneId | Scene ID | false | string | ||
| uid | End-user ID | false | string | ||
| Authorization | header | false | string |
Response Status:
| Status Code | Description | schema |
|---|---|---|
| 200 | OK | ApiResult«ExecutionResultCO» |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Parameters:
| Parameter Name | Parameter Description | Type | schema |
|---|---|---|---|
| code | integer(int32) | integer(int32) | |
| data | ExecutionResultCO | ExecutionResultCO | |
| callType | Call method | string | |
| executeResult | Execution result. Success: true, Failure: false | boolean | |
| executeTime | Execution time | integer(int64) | |
| executionId | Execution record ID | integer(int64) | |
| failActionList | Failure reasons | array | ExecuteFailedCO |
| deviceKey | string | ||
| deviceName | string | ||
| deviceType | integer | ||
| logoImage | string | ||
| productKey | string | ||
| reason | string | ||
| failCount | Failure count | AtomicInteger | AtomicInteger |
| andDecrement | integer | ||
| andIncrement | integer | ||
| successCount | Success count | AtomicInteger | AtomicInteger |
| andDecrement | integer | ||
| andIncrement | integer | ||
| extMsg | string | ||
| msg | string |
Response Example:
javascript
{
"code": 0,
"data": {
"callType": "",
"executeResult": true,
"executeTime": 0,
"executionId": 0,
"failActionList": [
{
"deviceKey": "",
"deviceName": "",
"deviceType": 0,
"logoImage": "",
"productKey": "",
"reason": ""
}
],
"failCount": {
"andDecrement": 0,
"andIncrement": 0
},
"successCount": {
"andDecrement": 0,
"andIncrement": 0
}
},
"extMsg": "",
"msg": ""
}