DeleteImages

1. API Description

The API is used to delete one or more images.

Note

Up to 5 images can be created in each zone. Deleting the image can release the quota.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter NameRequiredTypeDescription

imageIds

Yes

Array of String

ID list of images to be deleted.

3. Output Parameters

Parameter NameTypeDescription

requestId

String

The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Code Example

Delete one or more images.

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

Request:
{
  "imageIds": [
    "img-zCcHQB9u"
  ]
}

Response:
{
  "requestId": "TD8F9911F-E2FC-46FF-97CC-7C7127350B46",
  "response": {
    "requestId": "TD8F9911F-E2FC-46FF-97CC-7C7127350B46"
  }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.​

HTTP Status CodeError CodeDescription

404

INVALID_IMAGE_NOT_FOUND

Image not found.

400

INVALID_IMAGE_STATUS

Operations on the image with current status are not supported.

Last updated