Polyv Help Center

Help Center

Paginated Query of Material Library Channel Live Replay List

Updated: 2025-04-18 16:55:48

Interface Description

1、分页查询素材库频道直播回放列表
2、接口支持https协议

Interface URL

https://api.polyv.net/live/v4/channel/record-file/m-list

Online API Call

Request Method

GET

Interface Constraints

  1. The interface supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. Interface calls have frequency limits. See details

Request Parameter Description

Parameter Required Type Description
appId true String Account appId [See Get Secret Key]
timestamp true Long Current 13-digit millisecond timestamp, valid for 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be saved or used directly on the client side. All APIs must be relayed through the customer's own server to call the POLYV server for response data. [See Signature Generation Rules]
channelId true Integer Channel number
pageNumber false Integer Page number, default 1
pageSize false Integer Page size, default 10

Example

https://api.polyv.net/live/v4/channel/record-file/m-list?appId=frlr1zazn3&sign=DABFF35FB3D25CAF37BB73F8944C2F44&timestamp=1621840820088

Response Parameter Description

Parameter Type Description
code Integer Response status code, 200 for success, non-200 for failure [See Global Error Description]
status String Response status text
message String Response description, provides error details when code is 400 or 500
data Array Empty on failure; channel recording video information on success [See data field description]

data Field Description

Parameter Type Description
channelId String Channel number
fileId String Recording file ID
startTime String Recording start time, format: yyyyMMddHHmmss
endTime String Recording end time, format: yyyyMMddHHmmss
fileSize Long Recording file size (unit: bytes)
duration Integer Duration (unit: seconds)
channelSessionId String Live session ID
fileName String Recording file name
origin String Recording file source
manual: Manual recording
auto: Automatic recording
merge: Merge
clip: Clip
smart-clip: Smart clip
material: Material library video
originSessionId String Original live session ID
When the recording file is 手动录制 or 自动录制, it equals the current live session ID
When the recording file is 合并 or 裁剪, it is the original live session ID
recordFileType String Recording file type
complete: Full replay
part: Auto recording segment
merge: Manual merge
clip: Clip
watchUrl String Watch page URL
mp4 String MP4 video URL. Material library videos have an anti-leech expiration time of 1 day. Re-request the interface after expiration to obtain a new URL.
firstImage String Thumbnail

Java Request Example

For quick integration of basic code, please download the relevant dependency source code. Click to download source code. After downloading, add it to your own source project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded file.

It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.

private static final Logger log = LoggerFactory.getLogger(ChannelPlayBackTest.class);
/**
 * 查询频道录制视频信息
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void testGetChannelRecordInfo() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String appId = super.appId;
    String appSecret = super.appSecret;
    String userId = super.userId;
    String timestamp = String.valueOf(System.currentTimeMillis());
    //业务参数
    String url = "https://api.polyv.net/live/v4/channel/record-file/m-list";
    String channelId = "2139283";
    
    url = String.format(url, channelId);
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("userId", userId);
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    String response = HttpUtil.get(url, requestMap);
    log.info("测试分页查询素材库频道直播回放列表,返回值:{}", response);
    //do somethings
    
}

Response Example

For global system error descriptions, see Global Error Description

Success Example

{
    "code":200,
    "status":"success",
    "message":"",
    "data":[
        {
            "channelId":2191532,
            "fileId":"94ea693e1733389ae2e7693ebdacbd43",
            "mp4":"https://m-tc.videocc.net/record/record/recordf/1b448be323161536226913173df/2021-03-11-16-13-14_2021-03-11-16-15-07.mp4",
            "startTime":"",
            "endTime":"",
            "fileSize":9200637,
            "duration":114,
            "channelSessionId":"fwmnnydr06",
            "fileName":"Spring",
            "origin": "material",
            "originSessionId": "fwmnnydr06",
            "firstImage": "https://videolib-tc.videocc.net/material/2025-02-10/146b754735/video/146b7547358326684597f3499fa44887/146b7547358326684597f3499fa44887_1.jpg",
            "watchUrl": "//live.polyv.cn/watch/55708844?vid=a6b1459bb9fcd342893511b2226daae61db&playbackType=material"
        }
    ]
}

Error Example

{
    "code": 400,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}
联系客服,在线咨询