有奖捉虫:办公协同&微信生态&物联网文档专题 HOT

1. 接口描述

接口请求域名: iot.cloud.tencent.com/api/exploreropen/appapi。 本接口(AppDescribeAutomation)用于获取自动智能联动详情。

2. 输入参数

名称
类型
必选
描述
AccessToken
String
公共参数,用户通过微信号、手机或邮箱账号登录成功后,获取的访问 Token。
RequestId
String
公共参数,唯一请求 ID,可自行生成,推荐使用 uuid。定位问题时,需提供该次请求的 RequestId。
Action
String
公共参数,本接口取值:AppDescribeAutomation。
AutomationId
String
自动智能联动 ID。

3. 输出参数

名称
类型
描述
RequestId
String
公共参数,唯一请求 ID,与入参相同,定位问题时,需提供该次请求的 RequestId
Data
Object of Automation
自动智能联动实体

4. 示例

输入示例
POST https://iot.cloud.tencent.com/api/exploreropen/tokenapi HTTP/1.1
content-type: application/json
{
"RequestId": "req_1",
"Action": "AppDescribeAutomation",
"AutomationId": "a_cd61dd*******7d21d6aeffea",
"AccessToken": "8b4a70dd16105f******************18edd4e78a3bb8ec"
}
输出示例: 成功
{
"Response": {
"Data": {
"AutomationId": "a_cd61d*********d6aeffea",
"Icon": "https://www.****.com/",
"Name": "autoName",
"Status": 0,
"MatchType": 1,
"EffectiveBeginTime": "00:00", // 【两个新增参数,用来表示开始和结束时间】
"EffectiveEndTime": "23:59",
"EffectiveDays": "1111111", // 由0和1组成的7位数字,0表示不执行,1表示执行,第1位为周日,依次表示周一至周六
"Conditions": [
{
"CondId": "abc",
"CondType": 0,
"Property": {
"ProductId": "NJ****LZT4",
"DeviceName": "gw***v",
"AliasName": "d****me",
"IconUrl": "productIcon",
"PropertyId": "switch",
"Op": "eq",
"Value": 1
}
},
{
"CondId": "efg",
"CondType": 1,
"Timer": {
"Days": "1000000",
"TimePoint": "09:30"
}
}
],
"Actions": [
{
"ActionType": 0,
"ProductId": "R3****0EU",
"DeviceName": "df****yY",
"Data": "{\\"brightness\\": 25}",
"AliasName": "12345",
"IconUrl": "url"
},
{
"ActionType": 1,
"Data": "100"
}
]
},
"RequestId": "req_1"
}
}

5. 错误码

错误码
描述
InternalError
内部错误。
InternalError.InternalServerExceptionDB
DB 错误。
InvalidParameterValue
参数取值错误。
InvalidParameterValue.InvalidAccessToken
Token 无效。
InvalidParameterValue.NoPermission
用户对该设备无权限。