Image export

URL

/v1/imageexport

Method

POST

Request header

Refer to "Request headers" for details on the request headers of this API.

Table 1. Request headers
Request header Value Description
X-Auth-Token String Tokens that were retrieved using the Identity service.

Request body

Refer to "Request parameters" for details on the request parameters of this API. Each parameter is specified in JSON format in the request body.

Table 2. Request parameters
Parameter Value Description
image_id String Specify the allocated ID for the export target image.

An error will occur if the id of an image not existing is specified.

storage_container String URL of object storage where exported VM image files are deployed. Specify using the following format:

"/v1/AUTH_<tenantID>/<containerName>"

Response body

Refer to "List of response parameters when the state is normal" and "Response parameters when an error occurs" for details on the response parameters of this API. Each parameter is output in JSON format in the response body. Refer to "Detailed error information list" for details on error information returned when an error occurs.

Table 3. List of response parameters when the state is normal
Parameter Value Description
export_id String ID of the export process. Used when retrieving the status.

Table 4. Response parameters when an error occurs
Parameter Value Description
error_code String Detailed error code.
error_message String Detailed error message.

Table 5. Detailed error information list
Status code Detailed error code Detailed error message Action
400 40001 Required parameter 'image_id' is not specified. Modify the request content.
400 40002 Parameter 'image_id' has invalid value. Modify the request content.
400 40003 Required parameter 'storage_container' is not specified. Modify the request content.
400 40004 Parameter 'storage_container' has invalid value. Modify the request content.
400 40005 Project id does not exist. Specify the token which is retrieved with Authentication scope unspecified or project specified.
400 40007 Request body does not exist. Modify the request content.
400 40008 Request body is not a json format. Modify the request content.
400 40011 The size of the export image is too large. N/A. Exporting the image which size is larger than the maximum size limit is not possible.
400 40012 Glance access error. Parameter has invalid value. Modify the request content.
400 40015 The same request already exists. Modify the request content.
400 40016 The exported file already exists. Modify the request content.
400 40017 The uploaded file by image id does not exist in the object storage. Modify the request content.
403 40301 You cannot execute this API. Check with the Administrator about your account privileges.
500 50001 Internal server error. Contact support.
500 50002 Internal server error. Contact support.
500 50003 Internal server error. Contact support.
503 50301 Too many requests. Re-execute the image export API.

Status code

Refer to "Status codes" for details on the status codes returned by this API.

Table 6. Status codes
Status code Description
202 Indicates that the virtual server export process started normally.
400 Indicates an invalid request.
401 Indicates an invalid token.
403 Indicates that the virtual server export execution privileges do not exist.
500 Indicates that the virtual server export process failed due to an error.
503 Indicates that the virtual server export process failed due to the upper limit for concurrent executions of requests being exceeded.

Example response body

An example response body is shown below.


       {"export_id":"2df79018-758e-11e6-8797-6b9192ea4ac2"}