修改场景
开发中
本地
本地
PUT
http://127.0.0.1:9999/api/v1/scene
请求参数
Header 参数
x-token
string
可选
默认值:
{{x-token}}
Body 参数application/json
id
string
必需
name
string
必需
description
string
必需
actions
array [object {6}]
必需
action_type
string
必需
action_target
string
必需
action_param_type
string
可选
action_param
string
必需
action_value
string
可选
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"
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://127.0.0.1:9999/api/v1/scene' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"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成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
scene_id
string
必需
示例
{
"code": 200,
"message": "update scene successfully",
"data": {
"scene_id": "8af832a3-7e92-3fad-6a2f-de6c0f1e5810"
}
}
修改于 2024-04-29 00:26:15