查询设备本地历史流
最近更新时间:2026-03-19 18:16:28
天翼云智能视图服务API
1.查询设备本地历史流
接口功能介绍
本接口用于查询存储在设备本地侧的录像文件的历史流。
接口约束
仅支持gb28181设备。
URI
GET /devices/{DeviceId}/local/vod/streams
路径参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| DeviceId | 是 | String | 设备ID。 | 32388487739092996 |
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| OutNetwork | 否 | String | 播放网络类型,默认internet。取值:internet(互联网),vpn(视频专网)。 | vpn | |
| StreamNum | 是 | Integer | 第几个码流。取值:1(主码流)。 | 1 | |
| StartTime | 是 | Integer | 开始时间,适用于vod流类型,unix时间戳,单位秒。 | 1571639499 | |
| EndTime | 是 | Integer | 结束时间,适用于vod流类型,unix时间戳,单位秒。点播流时,开始时间和结束时间间隔不大于86400秒。 | 1571639999 |
请求参数
请求头header参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| Authorization | 是 | String | 认证信息。 | CT-HMAC-SHA256 Credential=FQ01GA2RR9IJFM1PWIPR/2023-07-18/vss, SignedHeaders=content-type;host;timestamp, Signature=c6e72dffcfb2d25d276e119781e1deb6656d966702191b2bd862d1691e39394f | |
| Content-Type | 是 | String | 互联网媒体类型。 | application/json;charset=utf-8 | |
| Host | 是 | String | 主机。 | vssapi.ctyun.cn | |
| Version | 是 | String | 版本。 | 2021-11-25 | |
| Timestamp | 是 | String | 时间戳。 | 1689643309 |
请求体body参数
无
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 响应状态码。 | 200 | |
| error | String | 错误码,执行成功时,不返回该字段。 | VSS_0001 | |
| message | String | 响应信息。 | 请求成功 | |
| requestId | String | 请求ID。 | 362d4e78556b47129182d0881fade86b | |
| returnObj | Object | 响应数据,执行失败时,不返回该字段。 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| DeviceId | String | 设备ID。 | 719322608810442752 | |
| Video | Object | 视频属性信息。 | Video | |
| PlayUrl | Object | 流的播放URL。 | PlayUrl | |
| RequestId | String | 请求ID。 | b0c9ab08303842e0bb47c0215b5718b2 |
表 Video
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| Codec | String | 编码格式。取值:h264,h265。 | h264 |
表 PlayUrl
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| FlvUrl | String | flv播放URL。 | http://example.ctyun.cn/example | |
| HlsUrl | String | hls播放URL。 | http://example.ctyun.cn/example | |
| WebrtcUrl | String | webrtc播放URL。 | http://example.ctyun.cn/example | |
| RtspUrl | String | rtsp播放URL。 | http://example.ctyun.cn/example | |
| RtmpUrl | String | rtmp播放URL。 | http://example.ctyun.cn/example |
请求示例
请求url
GET '/devices/719322608810442752/local/vod/streams?EndTime=1683287621&StreamNum=1&StartTime=1683286721'
请求头header
{
"Authorization": "CT-HMAC-SHA256 Credential=3GBQOX3K68SDJTHBM0WE/2023-05-06/vss, SignedHeaders=content-type;host;timestamp, Signature=ae52b98ae17b549ccce45881208333baf5b01dbb0425674ec54725a78ba18f4b",
"Content-Type": "application/json;charset=utf-8",
"Host": "vssapi.ctyun.cn",
"Version": "2021-11-25",
"Timestamp": "1683352745"
}
请求体body
无
响应示例
{
"statusCode": 200,
"message": "请求成功",
"requestId": "b0c9ab08303842e0bb47c0215b5718b2",
"returnObj": {
"RequestId": "b0c9ab08303842e0bb47c0215b5718b2",
"DeviceId": "719322608810442752",
"Video": {
"Codec": "h264"
},
"PlayUrl": {
"RtmpUrl": "http://example.ctyun.cn/example",
"FlvUrl": "http://example.ctyun.cn/example",
"HlsUrl": "http://example.ctyun.cn/example",
"WebrtcUrl": "http://example.ctyun.cn/example",
"RtspUrl": "http://example.ctyun.cn/example"
}
}
}
状态码
请参考状态码说明。
错误码
请参考错误码说明。
本页目录: