Polyv Help Center

Help Center

Edit Series Live Sessions

Updated: 2026-07-27 15:03:25

Interface Description

1、编辑系列直播场次
2、接口支持https协议

Interface URL

http://api.polyv.net/live/v4/channel/session/new/update

Online API Call

Request Method

POST

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 never be saved or used directly on the client side. All APIs must be called through the customer's own server to relay to the POLYV server for response data. See Signature Generation Rules
channelId false Integer Channel ID

Request Body Parameter Description

Parameter Required Type Description
sessionId true String Session ID
name true String Session name
planStartTime true String Session start time (13-digit timestamp)
planEndTime true Long Session end time (13-digit timestamp)
interactionScriptId false Integer Interaction script ID
playType false String Playback type (normal for normal playback, loop for loop playback)
splashImg false String Session cover image
splashLargeImg false String Portrait mode guide large image
splashImgBackgroundId false String Session cover background image ID
streamType false String Stream type (client for normal live, realDiskVideo for pseudo live)
videoPoolId false String Video ID from the material library for pseudo live (required when streamType is realDiskVideo)

Example

http://api.polyv.net/live/v4/channel/session/new/update?appId=frlr1zazn3&timestamp=1632809855078&channelId=2588188&sign=D02FA683640135D843D485EE84F6632A

Request body JSON parameters:

{
  "sessionId": "e9s2h3jd8f",
  "name": "专题直播-新品发布会-修订版",
  "planStartTime": 1761201943000,
  "planEndTime": 1761201953000,
  "interactionScriptId": 123,
  "playType": "normal",
  "splashImg": "https://example.com/splash-update.jpg",
  "splashLargeImg": "https://example.com/splash-large-update.jpg",
  "splashImgBackgroundId": "2",
  "streamType": "client",
  "videoPoolId": "vid_abc123"
}

Response Parameter Description

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine basic response status
status String Response result, determined by business logic. Returns success on success, error on failure
success Boolean Whether the response was successful
requestId String Request ID, a unique UUID generated for each request. Only used for troubleshooting and debugging, not related to business logic
data Object Session response object See data field description
error Object Error information

data Field Description

Parameter Type Description
channelId Integer Channel ID
userId String POLYV user ID
sessionId String Session ID
name String Session name
endTime String Session end time
createdTime String Session start time
planStartTime String Planned start time
planEndTime String Planned end time
splashImg String Cover image
splashLargeImg String Cover image for portrait and large image modes
splashImgBackgroundId Integer Cover image background template ID
pushClient String Push stream client type

Java Request Example

For quick integration of basic code, please download the related dependency source code. Click to download source code. After downloading, add it to your own source code project. HttpUtil.java and LiveSignUtil.java in the test cases are included 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(ChannelOperateTest.class);
/**
 * 更新新版场次
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void testSessionNewUpdateV4() throws IOException, NoSuchAlgorithmException {
    String appId = super.appId;
    String appSecret = super.appSecret;
    String timestamp = String.valueOf(System.currentTimeMillis());
    String url = "http://api.polyv.net/live/v4/channel/session/new/update";

    Map<String, String> query = new HashMap<>();
    query.put("appId", appId);
    query.put("timestamp", timestamp);
    query.put("channelId", "2588188");
    query.put("sign", LiveSignUtil.getSign(query, appSecret));

    Map<String, Object> body = new HashMap<>();
    body.put("sessionId", "e9s2h3jd8f");
    body.put("name", "专题直播-新品发布会-修订版");
    body.put("planStartTime", "1761201943000");
    body.put("planEndTime", "1761201953000");
    body.put("ignoreStartTimeVerify", true);
    body.put("interactionScriptId", 123);
    body.put("playType", "normal");
    body.put("splashImg", "https://example.com/splash-update.jpg");
    body.put("splashLargeImg", "https://example.com/splash-large-update.jpg");
    body.put("splashImgBackgroundId", "2");
    body.put("streamType", "client");
    body.put("videoPoolId", "vid_abc123");

    String fullUrl = HttpUtil.appendUrl(url, query);
    String response = HttpUtil.postJsonBody(fullUrl, JSON.toJSONString(body), null);
    log.info("返回值:{}", response);
}

Response Example

For global system error descriptions, see Global Error Description

Success Example

{
  "code": 200,
  "status": "success",
  "requestId": "847f0716fa76461baf8979aaa4415dc3.67.16342672396023837",
  "data": {
    "channelId": 2588188,
    "userId": "1b448be323",
    "sessionId": "e9s2h3jd8f",
    "name": "专题直播-新品发布会-修订版",
    "endTime": 1761201953000,
    "status": "end",
    "createdTime": 1761201953000,
    "planStartTime": 1761201953000,
    "planEndTime": 1761201953000,
    "splashImg": "https://example.com/splash-update.jpg",
    "splashLargeImg": "https://example.com/splash-large-update.jpg",
    "splashImgBackgroundId": 2,
    "pushClient": "client",
    "type": "manual"
  },
  "success": true
}

Error Example

{
  "code": 400,
  "status": "error",
  "requestId": "4081dbac03e6441e8bdd301d8feee5a2.124.16360831818611581",
  "error": {
    "code": 20001,
    "desc": "application not found."
  },
  "success": false
}
联系客服,在线咨询