Batch Delete Robot Information
Updated: 2023-03-17 11:53:21
API Description
1、批量删除机器人信息
2、接口支持https协议
API URL
http://api.polyv.net/live/v4/global/robot/delete-batch
Request Method
POST
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. API calls are subject to frequency limits. See details
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId [See Get Secret Key] |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key 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 the customer's own server to relay requests to the POLYV server for response data. [See Signature Generation Rules] |
| timestamp | true | String | Current 13-digit millisecond timestamp, valid within 3 minutes |
| ids | true | String | IDs of robot information, separated by commas. Maximum of 200 IDs per request |
Example
http://api.polyv.net/live/v4/global/robot/delete-batch?appId=frlr1zazn3&sign=67D79AAD457670C3DFDBC404D80AFF98&ids=814647%2C814646×tamp=1679023727554
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Status code, same as HTTP status code, used to determine the basic response status |
| data | Object | Data on successful response, returns null |
| error | Object | Error information when status code is not 200 [See Error Parameter Description] |
| requestId | String | Request ID, a unique UUID generated for each request, used only for troubleshooting and debugging, should not be tied to business logic |
| status | String | Response result, determined by business logic. Returns success on success, error on failure |
| success | Boolean | Whether the response was successful |
Error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to identify the specific error reason |
| desc | String | Error description, corresponding to error.code |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source project. The test cases include HttpUtil.java and LiveSignUtil.java, both contained in the downloaded file.
It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.
private static final Logger log = LoggerFactory.getLogger(getClass());
/**
* 批量删除机器人信息
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void robotDeleteBatchTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v4/global/robot/delete-batch";
String ids = "814647,358268";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("ids", ids);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
url = HttpUtil.appendUrl(url, requestMap);
String response = HttpUtil.postFormBody(url, null);
log.info("测试批量删除机器人信息成功:{}", response);
//do somethings
}
Response Example
For global system error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"requestId": "9ad65a2b5a79426ebaee25aa6692ae15.64.16790227648113453",
"data": null,
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
"error": {
"code": 20001,
"desc": "application not found."
},
"success": false
}
{
"code": 400,
"status": "error",
"requestId": "9ad65a2b5a79426ebaee25aa6692ae15.64.16790226355953223",
"error": {
"code": 30107,
"desc": "非法机器人信息ID:1"
},
"data": null,
"success": false
}
