删除文档
接口描述
1、删除频道文档接口
2、支持https协议接口URL
http://api.polyv.net/live/v3/channel/document/delete请求方式
POST接口约束
请求参数描述
参数名
必选
类型
说明
示例
响应参数描述
参数名
类型
说明
Java请求示例
响应示例
Last updated
1、删除频道文档接口
2、支持https协议http://api.polyv.net/live/v3/channel/document/deletePOSTLast updated
http://api.polyv.net/live/v3/channel/document/deleteappId=frlr1zazn3&sign=1B00420546771ECCF501FAF176A0B6AE&type=new&channelId=1965681×tamp=1621843168035&fileId=39e6bd3fe674c952815ad1a09c66e1061965681commonprivate static final Logger log = LoggerFactory.getLogger(ChannelDocTest.class);
/**
* 删除文档
* @throws IOException
*/
@Test
public void testDeleteDocument() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId=super.appId;
String appSecret=super.appSecret;
String userId = super.userId;
String timestamp=String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v3/channel/document/delete";
String channelId = "1965681";
String fileId = "39e6bd3fe674c952815ad1a09c66e1061965681common";
String type = "new";
//http 调用逻辑
Map<String,String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp",timestamp);
requestMap.put("channelId",channelId);
requestMap.put("fileId",fileId);
requestMap.put("type",type);
requestMap.put("sign",LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.postFormBody(url, requestMap);
log.info("测试删除文档:{}",response);
//do somethings
}{
"code":200,
"status":"success",
"message":"",
"data":""
}{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}