Delete sample images

Updated at:

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 limit

The queries per second (QPS) limit for this API is 20 per user. Exceeding this limit triggers throttling, which can impact your business. Plan your calls accordingly.

Request parameters

For information about common request parameters, see Common parameters.

The request body is a JSON object that contains the following fields:

NameTypeRequiredExampleDescription
dataIdsJSONArrayNo["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.
urlsJSONArrayNo["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.
libraryStringNotestThe 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:

NameTypeExampleDescription
codeInteger200

The error code. It is the same as the HTTP status code.

For more information, see Common error codes.

msgStringOKThe response message for the request.
dataIdString2Corresponds to the dataId in the request.
urlStringhttp://example.com/09850722457524.jpgCorresponds 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"
        }
    ]
}