设置定时巡航
# setCruiseConfig:设置定时巡航
# 功能详情
设置设备的定时巡航配置。
备注:设置设备的定时巡航配置,只支持具有TimedCruise能力的单通道IPC设备,如果需要开启巡航,需要保证regularCruise使能开关状态为开(regularCruise使能状态通过getDeviceCameraStatus接口获取)
# 请求地址
https://openapi.lechange.cn/openapi/setCruiseConfig
# 子账户token请求所需最小权限
"Permission":"Config" "Resource":"cam:序列号:通道号"
# 传入参数说明
| 参数名 | 参数类型 | 是否必填 | 默认值 | 合法值 | 参数说明 | ||
|---|---|---|---|---|---|---|---|
| token | String | 是 | 管理员或者子账户accessToken | ||||
| deviceId | String | 是 | 设备序列号 | ||||
| channelId | String | 是 | 通道号 | ||||
| cruisePlan | cruiseName | String | 否 | 巡航计划唯一标示符 | |||
| mode | String | 是 | default:默认模式,即全景巡航; collection:定制模式,即收藏点巡航 | 巡航模式 | |||
| cruisePath | String | 否 | 当mode=collection时必填,可选值如下:default:默认路径,由设备端决定;custom:自定义路径,即collection中收藏点的顺序 | 巡航路径 | |||
| collection | name | String | 否 | 当mode为collection,cruisePath为custom时必填 | 收藏点名 | ||
| stayTime | Integer | 否 | 当mode为collection,cruisePath为custom时必填 | 停留时间(s) | |||
| cruises | period | String | 是 | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday 只可设置一天,若需设置多天请设置多个巡航周期和起止时间 | 巡航周期 | ||
| beginTime | String | 是 | 时间格式为:THHMMSS | 开始时间 | |||
| endTime | String | 是 | 时间格式为:THHMMSS | 结束时间 | |||
注意:collection字段必须存在且为列表,其内容根据下面取值不同,限制不同: 1. 当mode为default时,cruisePath可选,collection字段长度和内容不限制; 2. 当mode为collection时,cruisePath必须存在,且为default或者custom之一; 2.1 如果cruisePath是default,collection字段内容和数组长度不限; 2.2 如果cruisePath为custom,collection字段长度不能为0,内容必须符合协议,且所设置收藏点name必须是加入巡航计划中的收藏点(即调用setCollection接口的needCruise字段为true),否则将不生效。
# 样例输入
{
"id":"d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"74bc756ebd53e9eef2836f8cf1730c10",
"time":1599031074,
"nonce":"8ec8a7bd1d1c95420de20d92422d457d"
},
"params":{
"token":"At_00006acr3456d12312d3grf60147de7ec",
"deviceId":"TESTQWERXXXX",
"channelId":"0",
"cruisePlan": {
"cruiseName":"cruiseName",
"mode":"collection",
"cruisePath":"custom",
"collection":[{
"name":"collectionName",
"stayTime":15
}],
"cruises":[{
"period":"Tuesday",
"beginTime":"T023122",
"endTime":"T112233"
}]
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 返回data字段说明
无data数据返回
# 样例输出
{
"result":{
"msg":"操作成功。",
"code":"0"
},
"id":"d5c287b4-5b2f-4f03-baf5-8032c5c354af"
}
1
2
3
4
5
6
7
2
3
4
5
6
7