Polyv Help Center

Help Center

Get All Playlists

Updated: 2026-03-31 10:14:55

API Description

1、获取播放列表详细信息
2、接口支持https协议

API URL

http://api.polyv.net/v2/play-list/list

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. API calls have a frequency limit. See details

Request Parameter Description

Parameter Required Type Description
userid true String POLYV VOD account ID. Refer to Get Secret Key for acquisition. Path: Official Website -> Login -> VOD (API Interface)
ptime true Long Current time in millisecond timestamp, valid within 3 minutes
sign true String Signature, a 40-character uppercase SHA1 value. The secretkey 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
playListIds false String Playlist IDs, multiple separated by commas, maximum 1000. Example: "1620153765497,1620142496099"
title false String Title, fuzzy search by title
vidStyle false String VID style. When the value is LONG_STYLE, the returned vid includes an underscore and the first letter of the userId, e.g., e4f34f779d7b2933adf2ef91419e15fc_e. When SIMPLE is passed or this parameter is omitted, the vid format is: e4f34f779d7b2933adf2ef91419e15fc
page false Integer Current page number, default is 1
pageSize false Integer Page size, maximum 1000, default is 10

Example

http://api.polyv.net/v2/play-list/list?playListIds=1620281719396&sign=9F5DC096563BF829DB240ABE3D2A3CB59B8437C4&pageSize=10&page=1&userid=1b448be323&ptime=1620282908818

Response Parameter Description

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, when code is 400 or 500, provides auxiliary error reason
data Object Returns playlist information on success, empty on failure. See data field description

data Field Description

Field Type Description
pageNumber Integer Page number
totalPages Integer Total pages
pageSize Integer Page size
contents Array Playlist paginated data. See contents field description
totalItems Integer Total count

contents Field Description

Field Type Description
id Long Playlist ID
description String Playlist description
tag String Playlist tag
title String Playlist title
creationTime Long Playlist creation time, 13-digit millisecond timestamp
updateTime Long Playlist last update time, 13-digit millisecond timestamp
videoCount Integer Number of videos in the playlist
videoList Array Video list in the playlist. See videoList field description

videoList Field Description

Field Type Description
vid String Video ID
title String Video title
cateId Long Category ID
cateName String Category name
tags String Video tags
duration Float Video duration, in seconds
coverURL String Video cover image URL
miniCoverURL String Cover image URL, small size, same as coverURL
largeCoverURL String Cover image URL, large size
addTime Long Video addition time, 13-digit millisecond timestamp

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 code project. The test cases include HttpUtil.java and VodSignUtil.java in the downloaded file.

It is strongly recommended to use the VOD Java SDK for API integration. The VOD 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(VodPlaylistTest.class);
/**
 * 获取所有播放列表
 * @throws Exception
 * @throws NoSuchAlgorithmException
 */
@Test
public void testGetPlayLists() throws Exception, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String secretKey = super.secretKey;
    String userId = super.userId;
    String ptime = String.valueOf(System.currentTimeMillis());
    //业务参数
    String url = "http://api.polyv.net/v2/play-list/list";
    String playListIds = "1620281719396";
    String page = "1";
    String pageSize = "10";

    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("userid", userId);
    requestMap.put("ptime", ptime);
    requestMap.put("playListIds", playListIds);
    requestMap.put("page", page);
    requestMap.put("pageSize", pageSize);
    requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));

    String response = HttpUtil.get(url, requestMap);
    log.debug("测试获取所有播放列表,{}", response);
    //do somethings

}

Response Example

For system global error descriptions, see Global Error Description

Success Example

{
  "code": 200,
  "status": "success",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "totalPages": 1,
    "pageSize": 10,
    "contents": [
      {
        "id": 1620281719396,
        "description": "这是描述",
        "tag": "测试创建",
        "title": "测试创建播放列表接口5-6",
        "creationTime": 1620281719396,
        "updateTime": 1620282805755,
        "videoCount": 1,
        "videoList": [
          {
            "vid": "1b448be32368e6eb106c31d490c19144",
            "title": "junit-远程批量上传视频",
            "duration": 85,
            "addTime": 1620282805755,
            "coverURL": "http://img.videocc.net/uimage/1/1b448be323/first_image/a626c3c8-8e73-4a9e-90f4-ea5217d5678d_s.jpg"
          }
        ]
      }
    ],
    "totalItems": 1
  }
}

Error Example

{
  "code": 400,
  "status": "error",
  "message": "the sign is not right",
  "data": ""
}
联系客服,在线咨询
在线咨询