Deleting Samples in Batches¶
Function¶
This API is used to delete samples in batches.
URI¶
POST /v2/{project_id}/datasets/{dataset_id}/data-annotations/samples/delete
Parameter | Mandatory | Type | Description |
---|---|---|---|
dataset_id | Yes | String | Dataset ID. |
project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
delete_source | No | Boolean | Whether to delete the source file. This field is valid for non-text datasets. (A text dataset is the entire text file. Therefore, deleting a piece of data from the text file does not affect the source text.) The options are as follows:
|
samples | No | Array of strings | Sample ID list. |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
error_code | String | Error code. |
error_msg | String | Error message. |
results | Array of BatchResponse objects | Response list for deleting a sample in batches. |
success | Boolean | Check whether the operation is successful. The options are as follows:
|
Parameter | Type | Description |
---|---|---|
error_code | String | Error code. |
error_msg | String | Error message. |
success | Boolean | Check whether the operation is successful. The options are as follows:
|
Example Requests¶
Deleting Samples in Batches
{
"samples" : [ "9cb9bc9b34bf53b6ec9a84998b1711bf", "9ea63ef78d8c9037c9bcb12b477821bf" ]
}
Example Responses¶
Status code: 200
OK
{
"success" : true
}
Status Codes¶
Status Code | Description |
---|---|
200 | OK |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
Error Codes¶
See Error Codes.