Get Channel Replay Details
Updated: 2022-09-02 18:08:07
Interface URL
https://api.polyv.net/live/v3/channel/playback/list-playback-detail
Interface Description
1、接口用于获取频道回放的详细信息
2、接口支持https
Supported Formats
JSON
Request Method
GET
Request Limit
TRUE
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | Yes | string | Obtained from API settings, the appId registered in the live streaming system |
| timestamp | Yes | long | Current 13-digit millisecond timestamp, valid within 3 minutes |
| sign | Yes | String | Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must never be saved or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server and obtain response data. See Signature Generation Rules for details |
| channelId | Yes | int | Channel ID |
| page | No | int | Page number, default is 1 |
| pageSize | No | int | Page size, default is 12, maximum is 1000 |
| startTime | No | string | Start time, format: yyyyMMddHHmmss. Filters replays whose live start time is greater than or equal to this parameter |
| endTime | No | string | End time, format: yyyyMMddHHmmss. Filters replays whose live start time is less than or equal to this parameter |
| fileId | No | string | Recording ID. If used, it performs an exact query and ignores the date range filter |
Successful Response JSON Example:
{
"code": 200,
"status": "success",
"message": "",
"data": {
"pageNumber": 1,
"totalPages": 1,
"pageSize": 1,
"contents": [
{
"channelId": 352078,
"sessionId": "fhbc977k1j",
"sessionIds": "[\"20191028151506,922,fhbc977k1j\"]",
"fileId": "73fe1f8f609ce315d7d8ab8a5a3c839e",
"title": "title",
"startTime": "20191028151506",
"endTime": "20191028153028",
"duration": 922,
"videoId": "eba9c64cae",
"mp4Url": "http://dl.videocc.net/23c0193d81/none_23c0193d819dcfc3e9184662f4fa56cd_1.mp4",
"recordPPTStatus": 1,
"recordPPTUrl": "http://dl.videocc.net/23c0193d81/none_23c0193d813efe97b0578b0c25ef2788_1.mp4",
"zipUrl": "http://liveimages.videocc.net/ppt/23c0193d819dcfc3e9184662f4fa56cd.zip",
"zipStatus": 1,
"origin": "auto"
}
]
}
}
Failed Response JSON Examples:
No appId entered
{
"code": 400,
"status": "error",
"message": "appId is required.",
"data": ""
}
Incorrect appId
{
"code": 400,
"status": "error",
"message": "application not found.",
"data": ""
}
Timestamp error
{
"code": 400,
"status": "error",
"message": "invalid timestamp.",
"data": ""
}
Signature error
{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": ""
}
Invalid channel ID format
{
"code": 400,
"status": "error",
"message": "param is not digit: dsadasd",
"data": ""
}
Invalid date format
{
"code": 400,
"status": "error",
"message": "invalid date time format",
"data": ""
}
Value out of range
{
"code": 400,
"status": "error",
"message": "number range error",
"data": ""
}
Field Description
| Parameter | Description |
|---|---|
| code | Response code: 200 for success, 400 for failure, 401 for signature error, 500 for server error |
| status | "success" for success, "error" for failure |
| message | Error message when an error occurs |
| data | Paginated replay details data on successful response |
| pageNumber | Current page number |
| totalPages | Total number of pages |
| pageSize | Page size |
| contents | List of replay detail data |
| channelId | Associated channel ID |
| sessionId | Single session ID corresponding to the replay |
| sessionIds | Array string of session IDs and times, format: ["20190703145126,4,fdqbopvtnv","20190703145126,8,fdqbopvtnv"]. In "20190703145126,4,fdqbopvtnv": the first field is the start time, the second is the live duration, and the third is the corresponding sessionId. |
| fileId | Corresponding recording file ID |
| title | Replay title |
| startTime | Live start time, format: yyyyMMddHHmmss. Filters replays whose live start time is greater than or equal to this parameter |
| endTime | Live end time, format: yyyyMMddHHmmss. Filters replays whose live start time is less than or equal to this parameter |
| duration | Live duration, in seconds |
| videoId | Replay ID, can be used for SDK online replay playback |
| mp4Url | MP4 download URL after replay conversion |
| recordPPTStatus | Remastering status: 1 = remastered and available, 0 = remastering not completed |
| recordPPTUrl | When remastering status is 1, this field is the remastered MP4 download URL |
| zipUrl | Offline package download URL |
| zipStatus | Offline package status: 0 = packaging not completed, 1 = completed |
| origin | Replay source: manual - cloud recording, auto - automatic recording, merge - merged, clip - clipped |
PHP Request Example
<?php
//引用config.php
include 'config.php';
$params = array(
'appId' => $appId,
'timestamp' => $timestamp,
'channelId' => 206204,
'page' => 1,
'pageSize' => 5,
'startTime' => '20191001120000',
'endTime' => '20191015235959'
);
//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法
$params['sign'] = $sign;
$url = "https://api.polyv.net/live/v3/channel/playback/list-playback-detail?".http_build_query($params);
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 0);
$res = curl_exec($curl);
curl_close($curl);
echo $res;
?>
