修改应用配置
PUT
/api/app/{app_id}
请求参数
Path 参数
app_id
string
必需
Header 参数
Authorization
string
可选
默认值:
Bearer {{token}}
Body 参数application/json
name
string
应用名称
description
string
应用描述
rules
array [object {7}]
应用规则列表
rule_id
string
规则唯一ID
name
string
规则名称
interval
integer
生成消息间隔
disable
boolean
规则禁用
class_area
object
动态区域配置
classes
array [object {6}]
规则类别列表
counter
object
计数规则
示例
{
"name": "string",
"description": "string",
"rules": [
{
"rule_id": "string",
"name": "string",
"interval": 0,
"disable": true,
"class_area": {
"color": "string",
"point_distance": {
"numeric_type": 0,
"min": 0,
"max": 0
}
},
"classes": [
{
"class_id": "string",
"name": "string",
"color": "string",
"threshold": 0,
"min_pixel": 0,
"max_pixel": 0
}
],
"counter": {
"numeric_type": 0,
"distance": 0,
"min_count": 0,
"max_count": 0,
"class_counts": [
{
"class_id": "string",
"min_count": 0,
"max_count": 0
}
]
}
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request PUT '/api/app/' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"description": "string",
"rules": [
{
"rule_id": "string",
"name": "string",
"interval": 0,
"disable": true,
"class_area": {
"color": "string",
"point_distance": {
"numeric_type": 0,
"min": 0,
"max": 0
}
},
"classes": [
{
"class_id": "string",
"name": "string",
"color": "string",
"threshold": 0,
"min_pixel": 0,
"max_pixel": 0
}
],
"counter": {
"numeric_type": 0,
"distance": 0,
"min_count": 0,
"max_count": 0,
"class_counts": [
{
"class_id": "string",
"min_count": 0,
"max_count": 0
}
]
}
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
app_id
string
必需
示例
{
"code": 0,
"msg": "ok",
"data": {
"app_id": "a0b35f001"
}
}
修改于 2025-06-03 10:41:47