添加规则链
POST
/api/v1/things/rule/chain/info/create
things/rule/chain/infothingsRuleChainInfo
请求参数
Header 参数
Ithings-Project-Id
string
可选
默认值:
{{Ithings-Project-Id}}
Ithings-Token
string
可选
默认值:
{{iThings-token}}
app-code
string
可选
默认值:
{{appCode}}
device-id
string
可选
Body 参数application/json
id
string
规则链的唯一标识符
groupID
string
所在分组的ID
name
string
规则链的名称
debugMode
integer <int64>
可选
DebugMode
配置root
integer <int64>
可选
disabled
integer <int64>
可选
configuration
object
可选
additionalInfo
object
是扩展字段
detail
object (RuleChainDetail)
可选
id
string
规则链的唯一标识符
firstNodeIndex
integer <int64>
可选
endpoints
object
可选
nodes
object
可选
connections
object
可选
createdTime
integer <int64>
可选
updatedTime
integer <int64>
可选
desc
string
可选
createdTime
integer <int64>
可选
updatedTime
integer <int64>
可选
示例
{
"id": "string",
"groupID": "string",
"name": "string",
"debugMode": 0,
"root": 0,
"disabled": 0,
"configuration": {},
"additionalInfo": {},
"detail": {
"id": "string",
"firstNodeIndex": 0,
"endpoints": {},
"nodes": {},
"connections": {},
"createdTime": 0,
"updatedTime": 0
},
"desc": "string",
"createdTime": 0,
"updatedTime": 0
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/things/rule/chain/info/create' \
--header 'Ithings-Project-Id: {{Ithings-Project-Id}}' \
--header 'Ithings-Token: {{iThings-token}}' \
--header 'app-code: {{appCode}}' \
--header 'device-id;' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
返回code
默认值:
200
msg
string
返回的消息
data
object (WithStrID)
可选
id
string
id
示例
{
"code": "200",
"msg": "string",
"data": {
"id": "string"
}
}
修改于 2025-03-01 12:39:36