1、通过分类id,移动分类的位置
2、接口URL中的{userid}为点播账号userid,具体参考菜单【使用须知】->【获取密钥】
3、接口支持https协议
4、每个账户预设根目录,名字为默认分类
http://api.polyv.net/v2/cata/{userid}/change
http://api.polyv.net/v2/cata/1b448be323/change
destCataid=1&sign=D9E1DD7A2165CEC5BD68BBBD03C3C92CE8B8B6A1&cataid=1617173363572&userid=1b448be323&ptime=1617241392823
强烈建议您使用点播Java SDK完成API的功能对接,点播Java SDK 对API调用逻辑、异常处理、数据签名、HTTP请求线程池进行了统一封装和优化。
private static final Logger log = LoggerFactory.getLogger(VodVideoCategoryTest.class);
/**
* 移动分类
*/
@Test
public void testMoveVideoCategory() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String secretKey = super.secretKey;
String userId = super.userId;
String ptime = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/v2/cata/" + userId + "/change";
String cataId = "1617173363572";
String destCataId = "1";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("userid", userId);
requestMap.put("ptime", ptime);
requestMap.put("cataid", cataId);
requestMap.put("destCataid", destCataId);
requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));
String response = HttpUtil.postFormBody(url, requestMap);
log.debug("测试移动分类,{}", response);
//do somethings
}
{
"code": 200,
"status": "success",
"message": "success",
"data": true
}
{
"code": 400,
"status": "error",
"message": "sign can not be empty.",
"data": ""
}