http://api.polyv.net/v3/video/source-file-task/create
http://api.polyv.net/v3/video/source-file-task/create
vids=1b448be32370f4822ac40fd926112a66_1%2C1b448be32305bb29879b1eb06abd9fa1_1&expireDays=1&appId=a0Wmol5EwX&sign=197679CCF105DD80E0378BEF75993D31×tamp=1617950661602
private static final Logger log = LoggerFactory.getLogger(Test.class);
/**
* 创建视频源文件取回任务
* @throws Exception
* @throws NoSuchAlgorithmException
*/
@Test
public void tesCreateVideoSourceFileTask() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/v3/video/source-file-task/create";
String vids = "1b448be32370f4822ac40fd926112a66_1,1b448be32305bb29879b1eb06abd9fa1_1";
int expireDays = 1;
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("vids", vids);
requestMap.put("expireDays", expireDays);
//用md5进行签名,使用子账号的secretKey签名
requestMap.put("sign", VodSignUtil.getSignMd5(requestMap, appSecret));
String response = HttpUtil.postFormBody(url, requestMap);
log.debug("测试创建视频源文件取回任务,{}", response);
//do somethings
}
{
"requestId": "9d43e946-5354-45a8-a4a7-0db49784fecf",
"code": 200,
"status": "success",
"error": null,
"data": {
"taskId": "16661c08b9564c1ea6f4544ccd568e58"
}
}
{
"requestId": "e7544473-250a-40eb-b53b-8768195617e0",
"code": 403,
"status": "error",
"error": {
"code": 104,
"desc": "invalid signature"
},
"data": null
}