Query Basic Information of All Channels
Updated: 2025-09-17 09:34:52
Legacy API endpoint Query Basic Information of All Channels (Legacy)
API Description
1、查询账号下所有的频道基础信息列表,观看页状态与新版后台一致
2、接口支持https协议
API URL
http://api.polyv.net/live/v4/channel/basic/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 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 stored or used directly on the client. 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 |
| categoryIds | false | String | Category IDs, multiple IDs separated by commas, up to 200 |
| channelIds | false | String | Channel numbers, multiple channels separated by commas |
| watchStatus | false | String | Watch page status filter live: Live playback: Playback end: Ended waiting: Waiting unStart: Not started |
| startTime | false | Long | Live start time, 13-digit timestamp for query start time |
| endTime | false | Long | Live end time, 13-digit timestamp for query end time |
| pageNumber | false | Integer | Page number, default 1 |
| pageSize | false | Integer | Items per page, default 10, maximum 1000 |
| orderBy | false | String | Sort field, default ascending by channel creation time startTimeDesc: Descending by start time startTimeAsc: Ascending by start time channelCreatedTimeDesc: Descending by channel creation time |
Example
http://api.polyv.net/live/v4/channel/basic/list?categoryIds=340019&pageNumber=2&appId=frlr1zazn3&sign=02E681A4BECB8D8B73056C08B1DF6443&pageSize=2×tamp=1648776618809
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. Returns success on success, error on failure |
| success | Boolean | Whether the response was successful |
| requestId | String | Request ID, a unique UUID generated per request, for debugging only, not for business use |
| error | Object | Error information when status code is not 200 See Error Field Description |
| data | Object | See data field description |
Error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to identify the specific error |
| desc | String | Error description, corresponds to error.code |
data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| pageNumber | Integer | Current page number |
| pageSize | Integer | Items per page |
| totalPages | Long | Total number of pages |
| totalItems | Long | Total number of items |
| contents | Array | Current page content See contents field description |
contents Parameter Description
| Parameter | Type | Description |
|---|---|---|
| channelId | String | Channel number |
| name | String | Channel name |
| publisher | String | Host name |
| startTime | Long | Live start time, 13-digit millisecond timestamp when started |
| pageView | Integer | Cumulative page views |
| likes | Integer | Number of likes on the watch page |
| coverImg | String | Channel icon URL |
| splashImg | String | Channel splash image URL |
| splashEnabled | String | Splash page toggle Y: Enabled N: Disabled |
| desc | String | Live description |
| maxViewer | Integer | Maximum concurrent viewers |
| watchUrl | String | Live watch URL, e.g., https://xxx.live.polyv.cn/watch/xxxx |
| watchStatus | String | Watch page status live: Live end: Ended playback: Playback waiting: Waiting unStart: Not started banpush: Banned from streaming |
| watchStatusText | String | Watch page status description: Live, Playback, Ended, Waiting, Not started, Banned from streaming |
| onlineNum | Integer | Number of online viewers |
| bgImg | String | Warm-up image URL |
| videoList | Array | Playback video list (playback list + on-demand list), sorted by addition time in descending order when multiple See videoList parameter description |
| categoryId | Integer | Category ID |
| scene | String | Live scene. Not used for new version live streams. alone: Event live topclass: Large class ppt: Three-screen seminar: Seminar |
| newScene | String | New backend live scene. If undefined, uses scene value. undefined: Undefined topclass: Large class double: Dual-teacher class (requires permission) train: Enterprise training seminar: Seminar alone: Event marketing |
| template | String | New backend live template. For legacy channels, this field is undefined. undefined: Undefined ppt: Three-screen (landscape) alone: Pure video (landscape) topclass: Pure video - fast (landscape) seminar: Seminar portrait_ppt: Three-screen (portrait) portrait_alone: Pure video (portrait) |
| streamType | String | Streaming method. client: Using broadcast client or third-party push (regular); disk: Pseudo-live |
VideoList Parameter Description
| Parameter | Type | Description |
|---|---|---|
| videoId | String | ID generated by the live system (playback video in the video library) |
| videoPoolId | String | On-demand video VID (playback video in the video library) |
| duration | String | Video duration (format: 00:01:29) |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click to download source code. Add it to your own source project after downloading. 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 pools.
private static final Logger log = LoggerFactory.getLogger(ChannelOperateTest.class);
/**
* 查询所有频道的基础信息
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testListChannelBasic() 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/basic/list";
String categoryIds = "340019";
String pageNumber = "2";
String pageSize = "2";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("categoryIds", categoryIds);
requestMap.put("pageNumber", pageNumber);
requestMap.put("pageSize", pageSize);
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",
"requestId": "d961bc1daf4844a39de9a2c57beb3f51.66.16487766217727375",
"data": {
"pageNumber": 2,
"pageSize": 2,
"totalPages": 36,
"totalItems": 71,
"contents": [
{
"channelId": 1981629,
"name": "创建并初始化频道-验证码观看",
"publisher": "主讲人sadboy",
"startTime": 1602306535000,
"coverImg": "https://liveimages.videocc.net/assets/wimages/pc_images/logo.png",
"splashImg": null,
"splashEnabled": "N",
"desc": "这是一个描述",
"watchUrl": "https://1b448be323.live.polyv.cn/watch/1981629",
"watchStatus": "end",
"watchStatusText": "已结束",
"bgImg": null,
"categoryId": 340019,
"pageView": 25,
"likes": 0,
"maxViewer": 0,
"onlineNum": 0,
"videoList": null,
"scene": "alone",
"newScene": "undefined",
"template": "alone"
},
{
"channelId": 2191569,
"name": "测试",
"publisher": "主持人名称",
"startTime": 1557888134000,
"coverImg": "https://liveimages.videocc.net/uploaded/images/2021/05/fyw76bd9ed.png",
"splashImg": "https://liveimages.videocc.net/uploaded/images/2021/05/fyw76bi945.png",
"splashEnabled": "Y",
"desc": "这是直播介绍,可以是html代码",
"watchUrl": "https://1b448be323.live.polyv.cn/watch/2191569",
"watchStatus": "end",
"watchStatusText": "已结束",
"bgImg": "http://static.live.polyv.net/uploaded/images/2016/07/egqo3soa33.jpg",
"categoryId": 340019,
"pageView": 1003,
"likes": 666,
"maxViewer": 100,
"onlineNum": 0,
"videoList": [
{
"videoId": "929b7c13bd",
"videoPoolId": "1b448be3231d54331c41d70c6656d8b4_1",
"duration": "00:01:29"
},
{
"videoId": "929b7c13bd",
"videoPoolId": "1b448be3231d54331c41d70c6656d8b4_1",
"duration": "00:01:29"
}
],
"scene": "ppt",
"newScene": "undefined",
"template": "undefined"
}
]
},
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
"error": {
"code": 20001,
"desc": "application not found."
},
"success": false
}
