Polyv Help Center

Help Center

Create Remastered Courseware Task

Updated: 2026-11-06 11:28:15

API Description

1、创建重制课件任务,需等候任务队列执行完成,不是实时重制
2、接口支持https协议

API URL

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

Online API Call

Request Method

POST

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended to ensure API security. API calls are rate-limited. For details, please see

Request Parameter Description

Parameter Name Required Type Description
appId true String Account appId [see Get Key for details]
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 information for communication data security. It is strictly prohibited to save it on the client for direct use. All APIs must be called through the customer's own server to relay requests to the POLYV server to obtain response data [see Signature Generation Rules for details]
channelId true String Channel ID
videoId true String Playback video ID [videoId can be obtained via Query Video Library List; supports playback videos of the material library type]
type false Integer Video layout, 0: three-screen, 1: document-only, 2: picture-in-picture, 3: vertical screen; if not passed, the channel setting is used. Picture-in-picture and vertical screen require Docker remastered courseware to be enabled
videoRatio false Integer Video ratio, 0: 16:9, 1: 4:3; only effective for three-screen and picture-in-picture layouts; if not passed, the channel setting is used
actionPosition false String Operation area (camera) position, left: left side, right: right side; only effective for three-screen and picture-in-picture layouts; if not passed, the channel setting is used
brandImg false String Public URL of the three-screen brand image; only effective for the three-screen layout. Supports jpg, jpeg, png, size no more than 2M. For 16:9 the size is 480×810, for 4:3 the size is 480×720. Images with the same aspect ratio and both width and height no smaller than these sizes will be scaled down proportionally; if not passed, the channel setting is used
verticalBackgroundImg false String Public URL of the vertical screen background image; only effective for the vertical screen layout. Supports jpg, jpeg, png, size no more than 2M, size is 1080×1920. Images with the same aspect ratio and both width and height no smaller than this size will be scaled down proportionally; if not passed, the channel setting is used

Layout parameter description:

  1. Each parameter is first format-validated (value range, address format); parameters that are correctly formatted but irrelevant to the current layout will be ignored
  2. For accounts without Docker remastered courseware enabled, type only supports 0 and 1, and videoRatio, actionPosition, brandImg will be ignored
  3. The image address must be accessible within 10 seconds. The API validates the format, size, and dimensions. After validation passes, the image is transferred and stored. If any step fails, no task is created
  4. If the image address is already a Polyv storage address, it is used directly without transfer

Example

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

Form parameters:

appId=frlr1zazn3&sign=F74A5CDE45B30A82A2A617DACA5FF45F&videoId=1b96d90bf5&channelId=2191532&timestamp=1621842070181

Response Parameter Description

Parameter Name Type Description
code Integer Response status code, 200 indicates success, non-200 indicates failure [see Global Error Description for details]
status String Response status text information
message String Response description information; when code is 400 or 500, it provides an auxiliary description of the error cause
data String Returns true on success, and an empty string on failure

Java Request Example

For quick integration basic code, please download the relevant dependency source code, click to download the source code, and add it to your own source project after downloading. HttpUtil.java and LiveSignUtil.java in the test cases are both included in the downloaded file.

It is strongly recommended that you use the Live Java SDK to complete API integration. The Live Java SDK uniformly encapsulates and optimizes API call logic, exception handling, data signing, and HTTP request thread pools.

private static final Logger log = LoggerFactory.getLogger(ChannelOperateTest.class);
/**
 * 创建重制课件任务
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void testAddRecordTask() 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/addRecordTask";
    String channelId = "2191532";
    String videoId = "1b96d90bf5";
    
    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("channelId", channelId);
    requestMap.put("videoId", videoId);
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    String response = HttpUtil.postFormBody(url, requestMap);
    log.info("测试创建重制课件任务,返回值:{}", response);
    //do somethings
    
}

Response Example

For the system global error description, see Global Error Description

Success example

{
    "code":200,
    "status":"success",
    "message":"",
    "data":true
}

Exception example

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