This topic describes the syntax of the DeleteImage operation and provides examples of this operation. You can call this operation to delete images from an Image Search instance.
Usage notes
This operation deletes images from an Image Search instance.
QPS limits
By default, the maximum number of queries supported by this operation is 20. In this case, the system can process at most 20 requests every second.
Debugging
Request parameters
Name | Type | Required | Example | Description |
---|---|---|---|---|
InstanceName | String | Yes | demoinstance1 |
The name of the Image Search instance. The name can be up to 20 characters in length. |
ProductId | String | Yes | 2092061_1 |
The ID of the commodity. Note A commodity may have multiple images.
|
PicName | String | No | 2092061_1.jpg |
The name of the image.
|
Response parameters
Name | Type | Example | Description |
---|---|---|---|
Message | String | success |
The error message returned. |
RequestId | String | 0703956F-9BCC-48FA-99F7-96C0BF449C69 |
The ID of the request. |
Code | Integer | 0 |
The error code returned.
|
Success | Boolean | true |
Indicates whether the request is successful. |
Data | Object |
The information about the deleted images. |
|
PicNames | Array of String | xxx.jpg |
The name (PicName) of the deleted image. |
Examples
Sample requests
{
"InstanceName": "demoinstance",
"PicName": "test",
"ProductId": "test",
}
Sample success responses
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "success",
"RequestId" : "1F59AE0A-8B57-14A6-BCE8-E2592CA5FA0F",
"Data" : {
"PicNames" : [ "5555.jpg" ]
},
"Code" : 0,
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | BadRequest | The request has invalid parameters. | The error message returned because a parameter is set to an invalid value. |
400 | InstanceStatusError | Your instance is unavailable. | The error message returned because the instance is unavailable. |
400 | InvalidInstance | The specified instance name is invalid. | The error message returned because the instance name is invalid. |
400 | NoCaretSeperator | The body content is missing the ^ separator. | The error message returned because specific symbols are missing in the request body. |
400 | EmptyMeta | The body content has an empty meta field. | The error message returned because the request body contains empty fields. |
400 | InvalidMetaItem | The meta field is invalid. | The error message returned because the meta field is set to an invalid value. |
400 | InvalidPicList | The specified pic_list parameter is invalid. | The error message returned because the pic_list field is set to an invalid value. |
400 | NoSpecifiedPic | The content of an image is not specified in the HTTP POST body. | The error message returned because no image is specified. |
400 | InvalidCategory | The specified category is invalid. | The error message returned because the category ID is invalid. |
400 | OverflowMaxResultNum | The specified number of total results exceeds the maximum of 500. | The error message returned because the specified number of images to return exceeds the upper limit, which is 500. |
400 | OverflowMaxReturnNum | The specified number of results for each request exceeds the maximum of 100. | The error message returned because the specified number of images to return in a single call exceeds the upper limit, which is 100. |
400 | InvalidIntAttr | The specified int_attr field is invalid. | The error message returned because the int filter field is set to an invalid value. |
400 | UnsupportedPicFormat | The specified image format is invalid. | The error message returned because the image format is invalid. |
400 | InvalidFilterClause | The specified filtering condition is invalid. | The error message returned because the filter condition is invalid. |
400 | InstanceOverQuota | The number of items exceeds the limit. | The error message returned because the number of images on the instance exceeds the upper limit. |
400 | IncorrectOrientation | The image contains incorrect rotation flags in the meta data. | The error message returned because the image carries rotation settings. Rotation settings are not supported. |
400 | UnsupportedPicPixels | The specified pixels is not supported. | The error message returned because the specified image pixel is not supported. |
403 | NoPermission | You are not authorized to perform this operation. | The error message returned because you are not authorized to perform this operation. |
403 | DeniedRequest | Your request was denied due to instance flow control. | The error message returned because your request has been denied due to throttling. |
500 | NetworkException | A network error occurred. | The error message returned because a network error occurred. |
500 | UnsupportedInstanceType | The instance type is not supported. | The error message returned because the instance type is not supported. |
500 | UnsupportedOperationType | The specified action is not supported. | The error message returned because the specified action is not supported. |
500 | AccessEngineFailed | An error occurred while accessing the search engine. | The error message returned because an error occurred while accessing the search engine. |
500 | InternalOssError | An internal OAS error occurred. | The error message returned because an internal algorithm error occurred. |
500 | InternalSwiftError | An internal SWIFT error occurred. | The error message returned because an internal message queue error occurred. |
500 | InternalTableStoreError | An internal Table Store error occurred. | The error message returned because an internal storage error occurred. |
For a list of error codes, visit the API Error Center.
Error codes
For a list of error codes, visit the API Error Center.