创建数据处理脚本
本地
本地
POST
http://127.0.0.1:9999/api/v1/data_script
数据处理脚本
请求参数
Header 参数
x-token
string
可选
默认值:
{{x-token}}
Body 参数application/json
content
string
脚本内容
description
string
描述
<= 255 字符
device_config_id
string
设备配置id
<= 36 字符
last_analog_input
string
上次模拟输入内容
name
string
必需
<= 99 字符
remark
string
可选
<= 255 字符
script_type
string
脚本类型
示例
{
"device_config_id": "09c992be-93fd-3c14-5a1e-c9881b35d152",
"enable_flag": "Y",
"name": "xxxxxx",
"content": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"remark": "xxxxx",
"last_analog_input": "xxxxxxxxxxxxxxxxx",
"description": "xxxxxxxxx",
"script_type": "A"
}
示例代码
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/data_script' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"device_config_id": "09c992be-93fd-3c14-5a1e-c9881b35d152",
"enable_flag": "Y",
"name": "xxxxxx",
"content": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"remark": "xxxxx",
"last_analog_input": "xxxxxxxxxxxxxxxxx",
"description": "xxxxxxxxx",
"script_type": "A"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
示例
{
"code": 200,
"message": "Create data_script successfully"
}
修改于 2024-12-18 03:49:20