1、通过视频id删除单个视频的问答题目
2、接口支持https协议
http://api.polyv.net/v2/video/delete-video-exam
http://api.polyv.net/v2/video/delete-video-exam
vid=1b448be3232194b94346000156cb568d_1&sign=9000B0170801F38B80B5AE21A8BB64B5DADC3691&userid=1b448be323&ptime=1620616838272&examIds=1794068293a
强烈建议您使用点播Java SDK完成API的功能对接,点播Java SDK 对API调用逻辑、异常处理、数据签名、HTTP请求线程池进行了统一封装和优化。
private static final Logger log = LoggerFactory.getLogger(VodVideoManageManagementTest.class);
/**
* 删除问答题目
*/
@Test
public void testDeleteQuiz() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String secretKey = super.secretKey;
String userId = super.userId;
String ptime = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/v2/video/delete-video-exam";
String vid = "1b448be3232194b94346000156cb568d_1";
String examIds = "1794068293a";
//调用参数
Map<String, String> requestMap = new HashMap<>();
requestMap.put("userid", userId);
requestMap.put("ptime", ptime);
requestMap.put("vid", vid);
requestMap.put("examIds", examIds);
requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));
String response = HttpUtil.postFormBody(url, requestMap);
log.debug("测试删除问答题目,{}", response);
//do somethings
}
{
"code":200,
"status":"success",
"message":"success"
}
{
"code":400,
"status":"error",
"message":"the sign is not right",
"data":""
}
{
"code":400,
"status":"error",
"message":"ptime is too old.",
"data":""
}
{
"code": 400,
"status": "error",
"message": "Illegal vid",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "Illegal param: 'xxx' for value: 'xxx'",
"data": null
}