Query Live Series Session List
Updated: 2026-07-27 15:03:29
API Description
1、查询系列直播场次列表
2、接口支持https协议
API URL
http://api.polyv.net/live/v4/channel/session/new/list
Request Method
GET
API Constraints
- 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: 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 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 details: Signature Generation Rules |
| channelId | false | Integer | Channel ID (if not provided, all sessions under the entire account are queried by default) |
| pageNumber | false | Integer | Page number, default is 1 |
| pageSize | false | Integer | Page size, default is 10 |
Example
http://api.polyv.net/live/v4/channel/session/new/list?appId=frlr1zazn3×tamp=1632809855078&channelId=2588188&sign=D02FA683640135D843D485EE84F6632A
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code, 200 for success, non-200 for failure See details: Global Error Description |
| status | String | Response status text |
| message | String | Response description, provides error details when code is 400 or 500 |
| data | Object | Empty on failure; contains channel session info on success See details: data field description |
data Field Description
| Parameter | Type | Description |
|---|---|---|
| pageSize | Integer | Number of items per page |
| pageNumber | Integer | Current page number |
| totalPages | Integer | Total number of pages |
| totalItems | Integer | Total number of items |
| contents | Array | Session list See details: contents field description |
contents Field Description
| Parameter | Type | Description |
|---|---|---|
| channelId | Integer | Channel ID |
| createdTime | Long | Session start time |
| diskVideoVO | Object | Hard disk push stream video info See details: diskVideoVO field description |
| endTime | Long | Session end time |
| interactionScriptVO | Object | Interactive script info See details: interactionScriptVO field description |
| name | String | Session name |
| planEndTime | Long | Planned end time |
| planStartTime | Long | Planned start time |
| pushClient | String | Push stream client type |
| sessionId | String | Session ID |
| splashImg | String | Cover image |
| splashImgBackgroundId | Integer | Background template ID for the cover image |
| splashLargeImg | String | Cover image for portrait/large mode |
| startTime | String | Session start time |
| status | String | Session status (unStart: not started, live: live streaming, end: ended, playback: replaying, expired: expired) |
| streamType | String | Stream type |
| userId | String | User ID |
| watchUrl | String | Watch URL |
diskVideoVO Field Description
| Parameter | Type | Description |
|---|---|---|
| channelId | Integer | Channel ID |
| createdTime | Long | Creation time |
| duration | String | Duration (format: HH:mm:dd) |
| durationSecond | Integer | Duration (seconds) |
| endTime | Long | End time |
| fileSize | Long | File size |
| firstImage | String | First frame image |
| playType | String | Play type (normal: normal play, loop: loop play) |
| startTime | Long | Start time |
| status | String | Status |
| title | String | Title |
| url | String | URL |
| userId | String | POLYV user ID |
| videoId | String | Pseudo-live video ID |
| videoPoolId | String | Video ID |
interactionScriptVO Field Description
| Parameter | Type | Description |
|---|---|---|
| id | Integer | Script ID (primary key) |
| name | String | Script name |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click here to download source code. After downloading, add it to your own source code project. The test cases include HttpUtil.java and LiveSignUtil.java, both contained in the download 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 listTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
//API请求地址
String url = "http://api.polyv.net/live/v4/channel/session/new/list";
String timestamp = String.valueOf(System.currentTimeMillis());
//请求参数
Map<String, String> params = new HashMap<String, String>();
params.put("appId", appId);
params.put("timestamp", timestamp);
params.put("channelId", "2588188");
//生成签名
String sign = LiveSignUtil.getSign(params, appSecret);
params.put("sign", sign);
//发送请求
String result = HttpUtil.sendGet(url, params);
//打印结果
log.info("返回值:{}", response);
}
Response Example
For system-wide global error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"message": "",
"data": {
"pageNumber": 1,
"pageSize": 10,
"totalPages": 1,
"totalItems": 2,
"contents": [
{
"channelId": 2588188,
"sessionId": "e9s2h3jd8f",
"name": "测试场次1",
"endTime": 1761201953000,
"status": "end",
"createdTime": 1761201953000,
"planStartTime": 1761201953000,
"planEndTime": 1761201953000,
"streamType": "client",
"pushClient": "web",
"splashImg": "https://example.com/image1.jpg",
"splashLargeImg": "https://example.com/large-image1.jpg",
"splashImgBackgroundId": 1,
"watchUrl": "https://live.polyv.net/2588188/e9s2h3jd8f",
"userId": "user123"
},
{
"channelId": 2588188,
"sessionId": "k7d9f2h1l5",
"name": "测试场次2",
"endTime": 1761201953000,
"status": "end",
"createdTime": 1761201953000,
"planStartTime": 1761201953000,
"planEndTime": 1761201953000,
"streamType": "client",
"pushClient": "web",
"splashImg": "https://example.com/image2.jpg",
"splashLargeImg": "https://example.com/large-image2.jpg",
"splashImgBackgroundId": 2,
"watchUrl": "https://live.polyv.net/2588188/k7d9f2h1l5",
"userId": "user123"
}
]
}
}
Error Example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
