glance-specs/specs/api/v2/image-binary-data-api-v2.rst
Anne Gentle f46438ab1c Adds Image service v1 and v2 specification info in general
Goal is to maintain API specs in the specs repo for each project
and to eliminate the image-api repo.

Splits up original v2 API document into multiple files.

Change-Id: I7b6fbb1ee4a9a2e04395a7aa942d9ebdb011cc85
2014-12-05 16:50:39 -06:00

1.1 KiB

Image API Binary Data API calls

Binary Data API

The following API calls are used to upload and download raw image data. For image metadata, see Metadata API.

Upload Image File

PUT /v2/images/<IMAGE_ID>/file

NOTE: An image record must exist before a client can store binary image data with it.

Request Content-Type must be 'application/octet-stream'. Complete contents of request body will be stored and become accessible in its entirety by issuing a GET request to the same URI.

Response status will be 204.

Download Image File

GET /v2/images/<IMAGE_ID>/file

Request body ignored.

Response body will be the raw binary data that represents the actual virtual disk. The Content-Type header will be 'application/octet-stream'.

The Content-MD5 header will contain an MD5 checksum of the image data. Clients are encouraged to verify the integrity of the image data they receive using this checksum.

If no image data has been stored, an HTTP status of 204 is returned.