Polyv Help Center

Help Center

Delete Video Marker Information at Specified Time Points

Updated: 2022-09-02 18:08:07

API Description

1、通过视频id删除单个视频指定时间点的打点信息
2、接口URL中的{userid}为点播账号userid,具体参考菜单【使用须知】->【获取密钥】
3、接口支持https协议

API URL

http://api.polyv.net/v2/video/{userid}/deleteKeyFrameByTime

Request Method

POST

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls are subject to rate limits. Click for details

Request Parameters

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 milliseconds timestamp, valid for 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 your own server to relay requests to the POLYV server for response data. See Signature Generation Rules for details
vid true String Video ID
times true String Time points in seconds to delete markers. Separate multiple values with commas, e.g., 20,30,50

Example

http://api.polyv.net/v2/video/1b448be323/deleteKeyFrame

Form Parameters:

vid=1b448be323a6a1a6c0c237856f555e88_1&times=10,20&sign=A666123008CB66207F7726DDC8A4041AB1EE49D4&userid=1b448be323&ptime=1617260162521

Response Parameters

Parameter Type Description
code Integer Response status code. 200 indicates success, non-200 indicates failure. See Global Error Description
status String Response status text
message String Response description. When code is 400 or 500, provides additional error details
data String Returns "success" on success, empty on failure

Java Request Example

For quick integration, download the relevant dependency source code. Click to download source code. After downloading, add it to your project. The test cases include HttpUtil.java and VodSignUtil.java in the downloaded package.

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 pooling.

private static final Logger log = LoggerFactory.getLogger(VodChapterMakerTest.class);
/**
 * 删除视频指定时间点的打点信息
 * @throws Exception
 * @throws NoSuchAlgorithmException
 */
@Test
public void testDeleteChapterMakerByTime() throws Exception, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String secretKey = super.secretKey;
    String userId = super.userId;
    String ptime = String.valueOf(System.currentTimeMillis());
    //业务参数
    String url = String.format("http://api.polyv.net/v2/video/%s/deleteKeyFrame", userId);
    
    String vid = "1b448be323a6a1a6c0c237856f555e88_1";
    String times = "10,20";
    
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("userid", userId);
    requestMap.put("ptime", ptime);
    requestMap.put("vid", vid);
    requestMap.put("times", times);
    requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));
    String response = HttpUtil.postFormBody(url, requestMap);
    log.debug("测试删除视频指定时间点的打点信息,{}", response);
    //do somethings
    
}

Response Example

For global error descriptions, see Global Error Description

Success Example

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

Error Example

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