更新应用
更新时间: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)
响应头域
除公共头域外,无其它特殊头域。
响应体
同查看指定应用返回。
示例
请求示例
Plain Text
1PUT /v1/app/app-marf5bfx07u3xsz9 HTTP/1.1
2x-bce-date: 2020-03-25T09:28:13Z
3host: evs.bj.baidubce.com
4content-type: application/json
5authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2020-03-25T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
6
7{
8 "configuration": {
9 "interval": "1000",
10 "effectiveTimes": [
11 {
12 "effectiveTimeStart": "06:00:00",
13 "effectiveTimeEnd": "09:00:00"
14 },
15 {
16 "effectiveTimeStart": "11:00:00",
17 "effectiveTimeEnd": "15:00:00"
18 },
19 {
20 "effectiveTimeStart": "16:00:00",
21 "effectiveTimeEnd": "19:00:00"
22 }
23 ],
24 "lifecycle": 7,
25 "confidence": 0.85,
26 "callback": {
27 "enabled": true,
28 "endpoint": "http://user.service/callback"
29 }
30 }
31}
响应示例
Plain Text
1HTTP/1.1 200 OK
2Transfer-Encoding: chunked
3x-bce-request-id: 012b9747-f13a-4a2c-a488-02b221844dca
4Cache-Control: no-cache
5Server: BWS
6Date: Tue, 24 Mar 202 013:34:07 GMT
7Content-Type: application/json;charset=UTF-8
8
9{
10 "appId": "app-marf5bfx07u3xsz9",
11 "name": "海淀区海淀中学附近人员布控",
12 "type": "001",
13 "spaceInfo": [
14 {
15 "spaceId": 1000101,
16 "spaceName": "space name 1"
17 },
18 {
19 "spaceId": 1000102,
20 "spaceName": "space name 2"
21 }
22 ],
23 "databaseInfo": [
24 {
25 "databaseId": "dbf-mark0ig2eaibsqyd",
26 "name": "人脸库示例2",
27 "description": ""
28 },
29 {
30 "databaseId": "dbf-marjxygzy884hyrq",
31 "name": "人脸库示例2",
32 "description": ""
33 }
34 ],
35 "configuration": {
36 "interval": "1000",
37 "effectiveTimes": [
38 {
39 "effectiveTimeStart": "06:00:00",
40 "effectiveTimeEnd": "09:00:00"
41 },
42 {
43 "effectiveTimeStart": "11:00:00",
44 "effectiveTimeEnd": "15:00:00"
45 },
46 {
47 "effectiveTimeStart": "16:00:00",
48 "effectiveTimeEnd": "19:00:00"
49 }
50 ],
51 "lifecycle": 7,
52 "confidence": 0.85,
53 "callback": {
54 "enabled": true,
55 "endpoint": "http://user.service/callback"
56 }
57 }
58}
错误码
参考公共错误码