1. 接口描述
接口请求域名:
iot.cloud.tencent.com/api/exploreropen/tokenapi
本接口(IotVideoDescribeCloudStorageEvents)用于拉取云存事件列表。2. 输入参数
名称 | 类型 | 必选 | 描述 |
Action | String | 是 | 公共参数,本接口取值:IotVideoDescribeCloudStorageEvents。 |
RequestId | String | 是 | 公共参数,唯一请求 ID,可自行生成,推荐使用 uuid。定位问题时,需要提供该次请求的 RequestId。 |
AccessToken | String | 是 | 公共参数,AccessToken 用于对一个已经登录的用户鉴权。 |
ProductId | String | 是 | 产品ID。 |
DeviceName | String | 是 | 设备名称。 |
StartTime | Integer | 否 | 起始时间(Unix 时间戳,秒级), 为0 表示 当前时间 - 24h |
EndTime | Integer | 否 | 结束时间(Unix 时间戳,秒级), 为0 表示当前时间 |
Context | String | 否 | 请求上下文, 用作查询游标 |
Size | Integer | 否 | 查询数据项目的最大数量, 默认为10。假设传Size=10,返回的实际事件数量为N,则 5 <= N <= 10 |
EventId | String | 否 | 事件标识符,可以用来指定查询特定的事件,如果不指定,则查询所有事件 |
UserId | String | 否 | 用户ID |
ChannelId | Integer | 否 | 通道ID 非NVR设备则不填 NVR设备则必填 默认为无 |
3. 输出参数
名称 | 类型 | 描述 |
RequestId | String | RequestId。 |
Events | Array of
CloudStorageEvent | 云存事件列表 |
Context | String | 请求上下文, 用作查询游标 |
Listover | Boolean | 拉取结果是否已经结束 |
Total | Integer | 内部结果数量,并不等同于事件总数 |
VideoURL | String | 视频播放URL |
4. 示例
输入示例
POST https://iot.cloud.tencent.com/api/exploreropen/tokenapi HTTP/1.1content-type: application/json{"Action": "AppDescribeTemplateBinding","AccessToken":"bf******************d098","RequestId": "f92406b3-5a9a-4fe8-bc43-45e3d794bb68","ProductId": "PRODUCT_ID","DeviceName": "DEVICENAME"}
输出示例:成功
{"Response": {"RequestId": "bd3ad0f6-5b9f-47cd-83db-223356926772","Total": 13,"Events": [{"StartTime": 842084401,"EndTime": 842084401,"Thumbnail": "","EventId": "id1_data"},{"StartTime": 842084401,"EndTime": 842084401,"Thumbnail": "","EventId": "id1_data"},{"StartTime": 842084401,"EndTime": 842084401,"Thumbnail": "","EventId": "id1_data"},{"StartTime": 1614847697,"EndTime": 167000000,"Thumbnail": "face_dection.jpg","EventId": "id1_data"},{"StartTime": 1614847697,"EndTime": 167000000,"Thumbnail": "face_dection.jpg","EventId": "id1_data"},{"StartTime": 1614847697,"EndTime": 167000000,"Thumbnail": "face_dection.jpg","EventId": "id1_data"},{"StartTime": 1614847697,"EndTime": 167000000,"Thumbnail": "face_dection.jpg","EventId": "id1_data"},{"StartTime": 1614847697,"EndTime": 167000000,"Thumbnail": "face_dection.jpg","EventId": "id1_data"},{"StartTime": 1614847697,"EndTime": 167000000,"Thumbnail": "face_dection.jpg","EventId": "id1_data"},{"StartTime": 1614847697,"EndTime": 167000000,"Thumbnail": "face_dection.jpg","EventId": "id1_data"}],"Context": "DnF1ZXJ5VGhlbkZldGNoKAAAAAABxjxlFmlDUHBXME5XVE55eUdHMDUwZTV4WWcAAAAAAcaq9BZFeGQwTXM5X1RvNnFRMFNhRm1MNTlRAAAAAAHGqvYWRXhkME1zOV9UbzZxUTBTYUZtTDU5UQAAAAABxk0BFnN5Q1hWNUp0UjcyZkZma2licmF3SmcAAAAAAcaq9RZFeGQwTXM5X1RvNnFRMFNhRm1MNTlRAAAAAAHGhvUWTzl2c3FBNVdUWnFSWXh4d012MGlzdwAAAAABxjxmFmlDUHBXME5XVE55eUdHMDUwZTV4WWcAAAAAAcaG9xZPOXZzcUE1V1RacVJZeHh3TXYwaXN3AAAAAAHGVbkWTVBJSndzX0VReVNoU3JOb2pWUm40UQAAAAABxk0AFnN5Q1hWNUp0UjcyZkZma2licmF3SmcAAAAAAcaG-BZPOXZzcUE1V1RacVJZeHh3TXYwaXN3AAAAAAHGqvgWRXhkME1zOV9UbzZxUTBTYUZtTDU5UQAAAAABxkfDFjdNdGYtaTR5UTBPNmFFcHkyUmlUVHcAAAAAAcY88hZOVnkwbjNfNFRqV2YwSWk1LWcz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cnhramc=","Listover": false,"VideoURL": "http://test.iotvideo.tencentcs.com/timeshift/live/test.m3u8"}}
输出示例:失败
{"Response": {"Error": {"Code": "InvalidParameterValue.InvalidAccessToken","Message": "Token无效"},"RequestId": "f92406b3-5a9a-4fe8-bc43-45e3d794bb68"}}
5. 错误码
错误码 | 描述 |
InvalidParameter | 无效参数。 |
InvalidParameterValue | 参数取值错误。 |
InvalidParameterValue.TokenInfoSaveError | Token 保存失败。 |