更新应用
更新时间:2021-06-24
接口描述
本接口用于更新一个AI上层应用,需要指定应用ID,仅支持更新configuration信息。
请求(Request)
请求URL
PUT /v1/app/{appId}
参数名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
appId | String | 是 | 应用ID |
请求头域
除公共头域外,无其它特殊头域。
请求体
参数名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
configuration | Object | 是 | 配置信息 |
+ interval | Long | 是 | 截帧频率,单位:毫秒 |
+ effectiveTimes | Array | 否 | 检测生效时段,支持多个;输入东八区时间,从00:00:00开始,到23:59:59结束,每段间隔最小半小时 |
++ effectiveTimeStart | String | 是 | 检测生效开始时间,格式"HH:mm:ss" |
++ effectiveTimeEnd | String | 是 | 检测生效结束时间,格式"HH:mm:ss" |
+ lifecycle | Long | 是 | 存储周期,支持1-500天 |
+ confidence | Float | 是 | 置信度,支持0-1浮点数,精度2位 |
+ callback | Object | 否 | 通知配置,当type为003时不可设置通知 |
++ enabled | Boolean | 是 | 是否开启通知 |
++ endpoint | String | 是 | 回调地址,开启时必填;支持http/https,https需用户自己检测域名证书链配置是否正确 |
++ authEnabled | Boolean | 否 | 回调是否添加签名信息,默认不加验证即false |
++ key | String | 否 | 回调签名key,用于计算token |
响应(Response)
响应头域
除公共头域外,无其它特殊头域。
响应体
同查看指定应用返回。
示例
请求示例
PUT /v1/app/app-marf5bfx07u3xsz9 HTTP/1.1
x-bce-date: 2020-03-25T09:28:13Z
host: evs.bj.baidubce.com
content-type: application/json
authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2020-03-25T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
{
"configuration": {
"interval": "1000",
"effectiveTimes": [
{
"effectiveTimeStart": "06:00:00",
"effectiveTimeEnd": "09:00:00"
},
{
"effectiveTimeStart": "11:00:00",
"effectiveTimeEnd": "15:00:00"
},
{
"effectiveTimeStart": "16:00:00",
"effectiveTimeEnd": "19:00:00"
}
],
"lifecycle": 7,
"confidence": 0.85,
"callback": {
"enabled": true,
"endpoint": "http://user.service/callback"
}
}
}
响应示例
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: 012b9747-f13a-4a2c-a488-02b221844dca
Cache-Control: no-cache
Server: BWS
Date: Tue, 24 Mar 202 013:34:07 GMT
Content-Type: application/json;charset=UTF-8
{
"appId": "app-marf5bfx07u3xsz9",
"name": "海淀区海淀中学附近人员布控",
"type": "001",
"spaceInfo": [
{
"spaceId": 1000101,
"spaceName": "space name 1"
},
{
"spaceId": 1000102,
"spaceName": "space name 2"
}
],
"databaseInfo": [
{
"databaseId": "dbf-mark0ig2eaibsqyd",
"name": "人脸库示例2",
"description": ""
},
{
"databaseId": "dbf-marjxygzy884hyrq",
"name": "人脸库示例2",
"description": ""
}
],
"configuration": {
"interval": "1000",
"effectiveTimes": [
{
"effectiveTimeStart": "06:00:00",
"effectiveTimeEnd": "09:00:00"
},
{
"effectiveTimeStart": "11:00:00",
"effectiveTimeEnd": "15:00:00"
},
{
"effectiveTimeStart": "16:00:00",
"effectiveTimeEnd": "19:00:00"
}
],
"lifecycle": 7,
"confidence": 0.85,
"callback": {
"enabled": true,
"endpoint": "http://user.service/callback"
}
}
}
错误码
参考公共错误码