Call this operation to remove sample images from a specified image similarity library.
Usage notes
API operation: /green/similarity/image/delete
The removal takes effect within one minute. You can remove up to 100 sample images per call.
You can call the API to remove similar image samples from a specified similar image library.For more information about constructing an HTTP request, see Request structure. Alternatively, you can use an SDK. For more information, see SDK overview.
QPS limits
You can call this operation up to 20 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
Request parameters
For information about common request parameters, see Common parameters.
The request body is a JSON object that contains the following fields:
| Name | Type | Required | Example | Description |
| dataIds | JSONArray | No | ["1", "2"] | A list of dataId values for the sample images to remove. Each element is a string. You can remove a maximum of 100 sample images in a single request. Note If you specify this parameter, do not specify urls. |
| urls | JSONArray | No | ["http://example.com/427945583303_5.jpe", "http://example.com/09850722457524.jpg"] | A list of URLs for the sample images to remove. Each element is a string. You can remove a maximum of 100 sample images in a single request. Note If you specify this parameter, do not specify dataIds. |
| library | String | No | test | The name of the image library to manage. If you do not specify this parameter, sample images are deleted from the default library. The name of the default library is `default`. |
Response data
For information about the response parameters, see Response parameters.
The data field in the response body is a JSON array. Each element of the array is an object that contains the following fields:
| Name | Type | Example | Description |
| code | Integer | 200 | The returned HTTP status code. For more information, see Common error codes. |
| msg | String | OK | The response message for the request. |
| dataId | String | 2 | Corresponds to the dataId in the request. |
| url | String | http://example.com/09850722457524.jpg | Corresponds to the url in the request. |
Examples
Request example
http(s)://[Endpoint]/green/similarity/image/delete
&<Common request parameters>
{
"dataIds": ["1", "2"],
"library":"test"
}Response example
{
"msg": "OK",
"code": 200,
"requestId": "33921869-CF8A-4E62-8C31-44F37341FFC1",
"data":[
{
"code":200,
"msg":"OK",
"dataId":"1",
"url":"http://example.com/427945583303_5.jpeg"
},
{
"code":200,
"msg":"OK",
"dataId":"2",
"url":"http://example.com/09850722457524.jpg"
}
]
}