新建自定义命令
开发中
本地
http://127.0.0.1:9999
本地
http://127.0.0.1:9999
POST
http://127.0.0.1:9999
请求参数
Header 参数
x-token
string
可选
默认值:
{{x-token}}
Body 参数application/json
device_template_id
string
设备模版ID
buttom_name
string
按钮名称
data_identifier
string
数据标识符
description
string
描述
instruct
string
指令内容
enable_status
string
启用状态
remark
string
备注
示例
{
"device_template_id":"test",
"buttom_name":"buttom_namebuttom_name",
"data_identifier":"data_identifier2",
"description":"description22",
"instruct":"instruct12",
"enable_status":"disable",
"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 POST 'http://127.0.0.1:9999/api/v1/device/model/custom/commands/' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"device_template_id":"test",
"buttom_name":"buttom_namebuttom_name",
"data_identifier":"data_identifier2",
"description":"description22",
"instruct":"instruct12",
"enable_status":"disable",
"remark":"remark"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
string
必需
示例
{
"code": 0,
"message": "string",
"data": "string"
}