Polyv Help Center

Help Center

Query Remastered Courseware Task List

Updated: 2023-06-09 09:08:29

API Description

1、查询课件重制任务列表
2、接口支持https协议

API URL

http://api.polyv.net/live/v3/channel/pptRecord/list

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details

Request Parameters

Parameter Required Type Description
appId true String Account appId See details on obtaining keys
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 stored 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 for response data. See signature generation rules
channelId true String Channel ID
sessionId false String Session ID in the remastered courseware module
status false String Status value
waiting: Awaiting processing
process: Processing
success: Remastering successful
fail: Remastering failed
uploaded: Uploaded to VOD successfully
uploadFailed: Upload to VOD failed
vodOweUploadFailed: VOD account overdue
vodSpaceOverUploadFailed: VOD storage full
startTime false String Live broadcast start time start range, format yyyyMMddHHmmss
endTime false String Live broadcast start time end range, format yyyyMMddHHmmss
page false Integer Page number
pageSize false Integer Number of items per page

Example

http://api.polyv.net/live/v3/channel/pptRecord/list?appId=frlr1zazn3&sign=4D564199C480715472D1929201121282&pageSize=2&startTime=20200111000000&sessionId=fsb50pwxec&endTime=20201111000000&page=1&channelId=1965681&timestamp=1621842179615&status=success

Response Parameters

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, assists in describing error reasons when code is 400 or 500
data Object Returns the remastered courseware result set on success See data field description
Data Parameter Description
Parameter Type Description
pageNumber Integer Current page number
totalPages Integer Total pages
pageSize Integer Number of items per page
contents Array Task list See Contents parameter description
Contents Parameter Description
Parameter Type Description
taskId Integer Task ID
channelId String Channel ID
title String Corresponding replay name
url String Remastered MP4 download URL, with a 24-hour anti-leech timeout
sessionId String Session ID in the remastered courseware module
startTime String Corresponding replay's live broadcast start time, format yyyyMMddhhmmss
status String Status value
waiting: Awaiting processing
process: Processing
success: Remastering successful
fail: Remastering failed
uploaded: Uploaded to VOD successfully
uploadFailed: Upload to VOD failed
remainDay Integer Remaining days before the remastered file expires; access and download will be unavailable after expiry
duration Integer Duration of the remastered video, in seconds
videoId String Live system video ID, e.g., 992d36fa40
vid String VOD video VID of the remastered courseware uploaded to VOD

Java Request Example

For quick integration of basic code, please download the relevant dependency source code. Click here to download the 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 packaging and optimization for API call logic, exception handling, data signing, and HTTP request thread pooling.

private static final Logger log = LoggerFactory.getLogger(ChannelOperateTest.class);
/**
 * 查询重制课件任务列表
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void testPptRecordList() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际
    String appId = super.appId;
    String appSecret = super.appSecret;
    String userId = super.userId;
    String timestamp = String.valueOf(System.currentTimeMillis());
    //业务参数
    String url="http://api.polyv.net/live/v3/channel/pptRecord/list";
    String channelId="1965681";
    String sessionId="fsb50pwxec";
    String status="success";
    String startTime="20200111000000";
    String endTime="20201111000000";
    String page=String.valueOf(1);
    String pageSize=String.valueOf(2);

    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("channelId", channelId);
    requestMap.put("sessionId", sessionId);
    requestMap.put("status", status);
    requestMap.put("startTime", startTime);
    requestMap.put("endTime", endTime);
    requestMap.put("page", page);
    requestMap.put("pageSize", pageSize);
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    String response = HttpUtil.get(url, requestMap);
    log.info("测试查询重制课件任务列表,返回值:{}", response);
    //do somethings

}
    

Response Example

See Global Error Description for system-wide error descriptions.

Success Example

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": {
        "pageNumber": 1,
        "totalPages": 1,
        "pageSize": 2,
        "contents": [
            {
                "taskId": 236067,
                "channelId": 1965681,
                "title": "修改标题后",
                "url": "http://playback.videocc.net/transform/992d36fa40_0.mp4?auth_key=1652509714-0-0-31919e0b005ec2c1b89b0385394f88ec",
                "sessionId": "fsb50pwxec",
                "startTime": "20201021145602",
                "status": "success",
                "remainDay": 0,
                "duration": 5,
                "videoId": "992d36fa40",
                "vid": "1b448be32312e7504159ce7008c81295_1"
            },
            {
                "taskId": 402456,
                "channelId": 1965681,
                "title": "回放183-33",
                "url": "http://playback.videocc.net/transform/14785e39ff_1.mp4?auth_key=1654219664-0-0-a3ca953d6666a788151abe56009ac90a",
                "sessionId": "g1yjsdnu9q",
                "startTime": "20210901171754",
                "status": "success",
                "remainDay": 0,
                "duration": 92,
                "videoId": "14785e39ff",
                "vid": null
            }
        ]
    }
}

Error Example

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