修改场景
开发中PUT
/api/v1/scene请求参数
Body 参数application/json
id
string
必需
name
string
必需
description
string
必需
actions
array [object {6}]
必需
action_type
string
必需
动作类型 10: 单个设备; 11: 单类设备 30 : 触发告警 40: 服务
action_target
string
必需
动作目标id,如设备id、设备配置id,场景id、告警id
action_param_type
string
可选
参数类型 TEL:遥测 ATTR:属性 CMD:命令
action_param
string
必需
动作类型为10,11时为具体参数; 当动作类型是30时,固定为 {间隔时间}, 单位 分
action_value
string
可选
目标值, 当动作类型是30时,记录上次触发时间
remark
string
可选
示例
{
"id": "8af832a3-7e92-3fad-6a2f-de6c0f1e5810",
"name": "yanhao",
"description": "haoyan",
"actions": [
{
"action_type": "10",
"action_target": "1",
"action_param_type": "2",
"action_param": "3",
"action_value": "4",
"remark": "5"
},
{
"action_type": "10",
"action_target": "3",
"action_param_type": "11",
"action_param": "44",
"action_value": "55",
"remark": "remark"
}
]
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
data
object
必需
scene_id
string
必需
示例
{
"code": 200,
"message": "update scene successfully",
"data": {
"scene_id": "8af832a3-7e92-3fad-6a2f-de6c0f1e5810"
}
}
最后修改时间: 9 个月前