# DeleteImages

## 1. API Description

This API is used to delete one or more images.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

<mark style="color:blue;">The API returns the IDs of images that failed to be deleted. An empty set indicates that all deletions succeeded.</mark>
{% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="160.99505615234375">Parameter Name</th><th width="116.4949951171875">Required</th><th width="158.18182373046875">Type</th><th>Description</th></tr></thead><tbody><tr><td>imageIds</td><td>Yes</td><td>Array of String</td><td>List of image IDs.</td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="160.0546875">Parameter Name</th><th width="140.95098876953125">Type</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>The unique request ID, which is returned for each request. RequestId is required for locating a problem.</td></tr><tr><td>imageIds</td><td>Array of String</td><td>List of image IDs that failed to be deleted. </td></tr></tbody></table>

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Delete images in batches.**

```json
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DeleteImages
<Common Request Params>

Request：
{
  "imageIds": [
    "imageId1","imageId2"
  ]
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "imageIds": []
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/test/ci-develop-en/api-introduction/software-toolkit/sdk/introduction) to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

No error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/test/ci-develop-en/api-introduction/instruction/commonerrorcode).​
