Image

Version:
2.16

Image API provided by Glance service

schemas

(Since Images v2.0)

Shows a JSON schema document that represents an image entity.

The following schema is solely an example. Consider only the response to the API call as authoritative.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

(Since Images v2.0)

Shows a JSON schema document that represents an images entity.

An images entity is a container of image entities.

The following schema is solely an example. Consider only the response to the API call as authoritative.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

(Since Images v2.1)

Shows a JSON schema document that represents an image member entity.

The following schema is solely an example. Consider only the response to the API call as authoritative.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

(Since Images v2.1)

Shows a JSON schema document that represents an image members entity.

An image members entity is a container of image member entities.

The following schema is solely an example. Consider only the response to the API call as authoritative.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

(Since Images v2.2)

Shows a JSON schema document that represents an task entity.

The following schema is solely an example. Consider only the response to the API call as authoritative.

Normal response codes: 200

Error response codes: 401

Responses

200

Ok

404

Error

(Since Images v2.2)

Shows a JSON schema document that represents a list of tasks.

An tasks list entity is a container of entities containing abbreviated information about individual tasks.

The following schema is solely an example. Consider only the response to the API call as authoritative.

Normal response codes: 200

Error response codes: 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition namespace entity.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition namespaces entity.

A namespaces entity is a container for namespace entities.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition namespace resource type association entity.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition namespace resource type associations entity.

A resource type associations entity is a container for resource type association entities.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition property entity.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition properties entity.

A properties entity is a container for property entities.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200 Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition object entity.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition objects entity.

An objects entity is a container for object entities.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition tag entity.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

Shows a JSON schema document that represents a metadata definition tags entity.

A tags entity is a container for tag entities.

The following schema document is an example. The authoritative response is the actual response to the API call.

Normal response codes: 200

Error response codes: 400, 401

Responses

200

Ok

404

Error

metadata-definition-resource-types

Lists all available resource types.

Using the other API calls in this section, you can create and maintain resource type associations between metadata definition namespaces and the resource types that are returned by this call.

Normal response codes: 200

Error response codes: 400, 401, 404

Responses

200

Ok

404

Error

Lists resource type associations in a namespace.

Normal response codes: 200

Error response codes: 400, 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

first

body

string

next

body

string

schema

body

string

404

Error

Creates a resource type association between a namespace and the resource type specified in the body of the request.

Normal response codes: 201

Error response codes: 400, 401, 403, 404, 409

Request

Responses

201

Ok

Name

Location

Type

Description

name

body

string

Resource type names should be aligned with Heat resource types whenever possible: https://docs.openstack.org/heat/latest/template_guide/openstack.html

prefix

body

string

Prefix for any properties in the namespace that you want to apply to the resource type. If you specify a prefix, you must append a prefix separator, such as the colon (:) character.

properties_target

body

string

Some resource types allow more than one key and value pair for each instance. For example, the Image service allows both user and image metadata on volumes. The properties_target parameter enables a namespace target to remove the ambiguity.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

404

Error

Responses

204

Ok

404

Error

metadata-definition-namespaces

Lists available namespaces.

Returns a list of namespaces to which the authenticated user has access. If the list is too large to fit in a single response, either because of operator configuration or because you’ve included a limit query parameter in the request to restrict the response size, the response will contain a link that you can use to get the next page of namespaces. Check for the presence of a next link and use it as the URI in a subsequent HTTP GET request. Follow this pattern until a next link is no longer provided.

The next link preserves any query parameters that you send in your initial request. You can use the first link to return to the first page in the collection. If you prefer to paginate through namespaces manually, use the limit and marker parameters.

The list operation accepts the resource_types and visibility query parameters, which you can use to filter the response.

To sort the results of this operation, use the sort_key and sort_dir parameters. The API uses the natural sorting order in the namespace attribute that you provide as the sort_key parameter.

Normal response codes: 200

Error response codes: 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

first

body

string

next

body

string

schema

body

string

404

Error

Creates a namespace.

A namespace must be unique across all users. Attempting to create an already existing namespace will result in a 409 (Conflict) response.

The Location response header contains the newly-created URI for the namespace.

Normal response codes: 201

Error response codes: 400, 401, 403, 409

Request

Responses

201

Ok

Name

Location

Type

Description

namespace

body

string

An identifier (a name) for the namespace. The value must be unique across all users.

display_name

body

string

User-friendly name to use in a UI to display the namespace name.

description

body

string

The description of the namespace.

visibility

body

string

The namespace visibility, either public or private.

protected

body

boolean

Namespace protection for deletion, either true or false.

owner

body

string

An identifier for the owner of this resource, usually the tenant ID.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

schema

body

string

The URI of the JSON schema describing a namespace.

self

body

string

The URI for this resource.

properties

body

object

404

Error

Gets details for a namespace.

The response body shows a single namespace entity with all details including properties, objects, and resource type associations.

If the namespace contains a resource type association that specifies a prefix, you may optionally include the name of the resource type as a query parameter. In that case, the prefix will be applied to all property names in the response. (See below for an example.)

Normal response codes: 200

Error response codes: 400, 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

namespace

body

string

An identifier (a name) for the namespace. The value must be unique across all users.

display_name

body

string

User-friendly name to use in a UI to display the namespace name.

description

body

string

The description of the namespace.

visibility

body

string

The namespace visibility, either public or private.

protected

body

boolean

Namespace protection for deletion, either true or false.

owner

body

string

An identifier for the owner of this resource, usually the tenant ID.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

Date and time of the last namespace modification

schema

body

string

The URI of the JSON schema describing a namespace.

self

body

string

The URI for this resource.

properties

body

object

A dictionary of key:value pairs, where each value is a property object as defined by the Metadefs Property Schema.

404

Error

Updates a namespace.

Normal response codes: 200

Error response codes: 400, 401, 403, 404, 409

Request

Responses

200

Ok

Name

Location

Type

Description

namespace

body

string

An identifier (a name) for the namespace. The value must be unique across all users.

display_name

body

string

User-friendly name to use in a UI to display the namespace name.

description

body

string

The description of the namespace.

visibility

body

string

The namespace visibility, either public or private.

protected

body

boolean

Namespace protection for deletion, either true or false.

owner

body

string

An identifier for the owner of this resource, usually the tenant ID.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

schema

body

string

The URI of the JSON schema describing a namespace.

self

body

string

The URI for this resource.

properties

body

object

404

Error

Deletes a namespace and its properties, objects, and any resource type associations.

A successful operation returns the HTTP 204 (No Content) response code.

Normal response codes: 204

Error response codes: 400, 401, 403, 404

Responses

204

Ok

404

Error

metadata-definition-properties

Lists property definitions in a namespace.

Normal response codes: 200

Error response codes: 400, 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

properties

body

object

A dictionary of key:value pairs, where each value is a property object as defined by the Metadefs Property Schema.

first

body

string

next

body

string

schema

body

string

404

Error

Creates a property definition in a namespace.

The schema is a subset of the JSON property definition schema.

Normal response codes: 201

Error response codes: 400, 404

Request

Responses

201

Ok

Name

Location

Type

Description

name

body

string

title

body

string

The title of the property.

description

body

string

Detailed description of the property.

type

body

string

The property type.

minimum

body

number

Minimum allowed numerical value.

maximum

body

number

Maximum allowed numerical value.

maxLength

body

integer

Maximum allowed string length.

pattern

body

string

A regular expression ( ECMA 262 ) that a string value must match.

readonly

body

boolean

Indicates whether this is a read-only property.

items

body

object

Schema for the items in an array.

items.type

body

string

maxItems

body

integer

Maximum allowed string length.

uniqueItems

body

boolean

Indicates whether all values in the array must be distinct.

additionalItems

body

boolean

Describes extra items, if you use tuple typing. If the value of items is an array (tuple typing) and the instance is longer than the list of schemas in items, the additional items are described by the schema in this property. If this value is false, the instance cannot be longer than the list of schemas in items. If this value is true, that is equivalent to the empty schema (anything goes).

404

Error

Responses

204

Ok

404

Error

Shows the definition for a property.

If you use the resource_type query parameter, the API removes the prefix of the resource type from the property name before it submits the query. This enables you to look for a property name that starts with a prefix from an associated resource type.

The response body shows a single property entity.

Normal response codes: 200

Error response codes: 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

name

body

string

title

body

string

The title of the property.

description

body

string

Detailed description of the property.

type

body

string

The property type.

minimum

body

number

Minimum allowed numerical value.

maximum

body

number

Maximum allowed numerical value.

maxLength

body

integer

Maximum allowed string length.

pattern

body

string

A regular expression ( ECMA 262 ) that a string value must match.

readonly

body

boolean

Indicates whether this is a read-only property.

items

body

object

Schema for the items in an array.

items.type

body

string

maxItems

body

integer

Maximum allowed string length.

uniqueItems

body

boolean

Indicates whether all values in the array must be distinct.

additionalItems

body

boolean

Describes extra items, if you use tuple typing. If the value of items is an array (tuple typing) and the instance is longer than the list of schemas in items, the additional items are described by the schema in this property. If this value is false, the instance cannot be longer than the list of schemas in items. If this value is true, that is equivalent to the empty schema (anything goes).

404

Error

Updates a property definition.

Normal response codes: 200

Error response codes: 400, 401, 403, 404, 409

Request

Responses

200

Ok

Name

Location

Type

Description

name

body

string

The name of the property. A Name is limited to 80 chars in length.

title

body

string

The title of the property.

description

body

string

The description of the namespace.

type

body

string

The property type.

minimum

body

number

Minimum allowed numerical value.

maximum

body

number

Maximum allowed numerical value.

maxLength

body

integer

Maximum allowed string length.

pattern

body

string

A regular expression ( ECMA 262 ) that a string value must match.

readonly

body

boolean

Indicates whether this is a read-only property.

items

body

object

Schema for the items in an array.

items.type

body

string

maxItems

body

integer

Maximum allowed string length.

uniqueItems

body

boolean

Indicates whether all values in the array must be distinct.

additionalItems

body

boolean

Describes extra items, if you use tuple typing. If the value of items is an array (tuple typing) and the instance is longer than the list of schemas in items, the additional items are described by the schema in this property. If this value is false, the instance cannot be longer than the list of schemas in items. If this value is true, that is equivalent to the empty schema (anything goes).

404

Error

Removes a property definition from a namespace.

When you successfully delete a property from a namespace, the response is empty and the response code is 204.

Normal response codes: 204

Error response codes: 401, 403, 404

Responses

204

Ok

404

Error

metadata-definition-objects

Lists object definitions in a namespace.

Returns a subset of the larger collection of namespaces and a link that you can use to get the next set of namespaces. You should always check for the presence of a next link and use it as the URI in a subsequent HTTP GET request. You should follow this pattern until a next link is no longer provided. The next link preserves any query parameters that you send in your initial request. You can use the first link to jump back to the first page of the collection. If you prefer to paginate through namespaces manually, use the limit and marker parameters.

Use the resource_types and visibility query parameters to filter the response.

For example, set the resource_types query parameter to OS::Glance::Image,OS::Nova::Flavor to filter the response to include only namespaces that are associated with the given resource types.

You can sort the results of this operation by using the sort_key and sort_dir parameters. The API uses the natural sorting of whatever namespace attribute is provided as the sort_key.

Normal response codes: 200

Error response codes: 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

first

body

string

next

body

string

schema

body

string

404

Error

Creates an object definition in a namespace.

Normal response codes: 201

Error response codes: 400, 401, 403, 404, 409

Request

Responses

201

Ok

Name

Location

Type

Description

name

body

string

The name of the object, suitable for use as an identifier. A Name is limited to 80 chars in length.

description

body

string

Detailed description of the object.

properties

body

object

A set of key:value pairs, where each value is a property entity.

schema

body

string

The URI of the JSON schema describing an object.

self

body

string

The URI for this resource.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

404

Error

Responses

204

Ok

404

Error

Shows the definition for an object.

The response body shows a single object entity.

Normal response codes: 200

Error response codes: 400, 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

name

body

string

The name of the object, suitable for use as an identifier. A Name is limited to 80 chars in length.

description

body

string

Detailed description of the object.

properties

body

object

A set of key:value pairs, where each value is a property entity.

schema

body

string

The URI of the JSON schema describing an object.

self

body

string

The URI for this resource.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

404

Error

Updates an object definition in a namespace.

The object resource is completely replaced by what you specify in the request body. Thus, if you leave out any of the optional parameters, and they exist in the current object, they will be eliminated by this call.

It is possible to change the name of the object with this call; if you do, note that the URL for the object (specified by the self field) will change.

Normal response codes: 200

Error response codes: 400, 401, 403, 404, 409

Request

Responses

200

Ok

Name

Location

Type

Description

name

body

string

The name of the object, suitable for use as an identifier. A Name is limited to 80 chars in length.

description

body

string

Detailed description of the object.

properties

body

object

A set of key:value pairs, where each value is a property entity.

schema

body

string

The URI of the JSON schema describing an object.

self

body

string

The URI for this resource.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

404

Error

Deletes an object definition from a namespace.

When you successfully delete an object from a namespace, the response is empty and the response code is 204.

Normal response codes: 204

Error response codes: 400, 401, 403, 404

Responses

204

Ok

404

Error

metadata-definition-tags

Lists the tag definitions within a namespace.

To manually paginate through the list of tags, use the limit and marker parameters.

To sort the results of this operation use the sort_key and sort_dir parameters. The API uses the natural sort order of the tag attribute of the sort_key parameter.

Normal response codes: 200

Error response codes: 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

first

body

string

next

body

string

schema

body

string

404

Error

Creates one or more tag definitions in a namespace.

Normal response codes: 201

Error response codes: 400, 401, 403, 404, 409

Request

Responses

201

Ok

Name

Location

Type

Description

name

body

string

created_at

body

string

Date and time of tag creation

updated_at

body

string

Date and time of the last tag modification

404

Error

Deletes all tag definitions within a namespace.

When you successfully delete the tags from a namespace, the response is empty and the response code is 204.

Normal response codes: 204

Error response codes: 403, 404

Responses

204

Ok

404

Error

Gets a definition for a tag.

The response body shows a single tag entity.

Normal response codes: 200

Error response codes: 400, 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

name

body

string

The name of the tag. A Name is limited to 80 chars in length.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

404

Error

Adds a tag to the list of namespace tag definitions.

Normal response codes: 201

Error response codes: 400, 401, 403, 404, 409

Request

Responses

201

Ok

Name

Location

Type

Description

name

body

string

The name of the tag. A Name is limited to 80 chars in length.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

404

Error

Renames a tag definition.

Normal response codes: 200

Error response codes: 400, 401, 403, 404, 409

Request

Responses

200

Ok

Name

Location

Type

Description

name

body

string

The name of the tag. A Name is limited to 80 chars in length.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the resource was last updated.

The date and time stamp format is ISO 8601.

404

Error

Deletes a tag definition within a namespace.

When you successfully delete a tag from a namespace, the response is empty and the response code is 204.

Normal response codes: 204

Error response codes: 400, 401, 403, 404

Responses

204

Ok

404

Error

images

Lists public virtual machine (VM) images. (Since Image API v2.0)

Pagination

Returns a subset of the larger collection of images and a link that you can use to get the next set of images. You should always check for the presence of a next link and use it as the URI in a subsequent HTTP GET request. You should follow this pattern until a next link is no longer provided.

The next link preserves any query parameters that you send in your initial request. You can use the first link to jump back to the first page of the collection. If you prefer to paginate through images manually, use the limit and marker parameters.

Query Filters

The list operation accepts query parameters to filter the response.

A client can provide direct comparison filters by using most image attributes, such as name=Ubuntu, visibility=public, and so on.

To filter using image tags, use the filter tag (note the singular). To filter on multiple tags, include each tag separately in the query. For example, to find images with the tag ready, include tag=ready in your query string. To find images tagged with ready and approved, include tag=ready&tag=approved in your query string. (Note that only images containing both tags will be included in the response.)

A client cannot use any link in the json-schema, such as self, file, or schema, to filter the response.

You can list VM images that have a status of active, queued, or saving.

The in Operator

As a convenience, you may specify several values for any of the following fields by using the in operator:

For most of these, usage is straight forward. For example, to list images in queued or saving status, use:

GET /v2/images?status=in:saving,queued

To find images in a particular list of image IDs, use:

GET /v2/images?id=in:3afb79c1-131a-4c38-a87c-bc4b801d14e6,2e011209-660f-44b5-baf2-2eb4babae53d

Using the in operator with the name property of images can be a bit trickier, depending upon how creatively you have named your images. The general rule is that if an image name contains a comma (,), you must enclose the entire name in quotation marks ("). As usual, you must URL encode any characters that require it.

For example, to find images named glass, darkly or share me, you would use the following filter specification:

GET v2/images?name=in:"glass,%20darkly",share%20me

As with regular filtering by name, you must specify the complete name you are looking for. Thus, for example, the query string name=in:glass,share will only match images with the exact name glass or the exact name share. It will not find an image named glass, darkly or an image named share me.

Size Comparison Filters

You can use the size_min and size_max query parameters to filter images that are greater than or less than the image size. The size, in bytes, is the size of an image on disk.

For example, to filter the container to include only images that are from 1 to 4 MB, set the size_min query parameter to 1048576 and the size_max query parameter to 4194304.

Time Comparison Filters

You can use a comparison operator along with the created_at or updated_at fields to filter your results. Specify the operator first, a colon (:) as a separator, and then the time in ISO 8601 Format. Available comparison operators are:

For example:

Sorting

You can use query parameters to sort the results of this operation.

To sort the response, use the sort_key and sort_dir query parameters:

Alternatively, specify the sort query parameter:

Normal response codes: 200

Error response codes: 400, 401, 403

Responses

200

Ok

Name

Location

Type

Description

first

body

string

next

body

string

schema

body

string

404

Error

Creates a catalog record for an operating system disk image. (Since Image API v2.0)

The Location response header contains the URI for the image.

A multiple store backend support is introduced in the Rocky release as a part of the EXPERIMENTAL Image API v2.8. Since Image API v2.8 a new header OpenStack-image-store-ids which contains the list of available stores will be included in response. This header is only included if multiple backend stores are supported.

The response body contains the new image entity.

Synchronous Postconditions

Normal response codes: 201

Error response codes: 400, 401, 403, 409, 413, 415

Request

Responses

201

Ok

Name

Location

Type

Description

id

body

string

A unique, user-defined image UUID, in the format:

nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn

Where n is a hexadecimal digit from 0 to f, or F.

For example:

b2173dd3-7ad6-4362-baa6-a68bce3565cb

If you omit this value, the API generates a UUID for the image.

name

body

[‘null’, ‘string’]

The name of the image. Value might be null (JSON null data type).

status

body

string

The image status.

visibility

body

string

Image visibility, that is, the access permission for the image.

protected

body

boolean

A boolean value that must be false or the image cannot be deleted.

os_hidden

body

boolean

This field controls whether an image is displayed in the default image-list response. A “hidden” image is out of date somehow (for example, it may not have the latest updates applied) and hence should not be a user’s first choice, but it’s not deleted because it may be needed for server rebuilds. By hiding it from the default image list, it’s easier for end users to find and use a more up-to-date version of this image. (Since Image API v2.7)

checksum

body

[‘null’, ‘string’]

An MD5 hash over the image data. The value might be null (JSON null data type), as this field is no longer populated by the Image Service beginning with the Victoria release. It remains present for backward compatibility with legacy images. To validate image data, instead use the secure multihash fields os_hash_algo and os_hash_value.

os_hash_algo

body

[‘null’, ‘string’]

The algorithm used to compute a secure hash of the image data for this image. The result of the computation is displayed as the value of the os_hash_value property. The value might be null (JSON null data type). The algorithm used is chosen by the cloud operator; it may not be configured by end users. (Since Image API v2.7)

os_hash_value

body

[‘null’, ‘string’]

The hexdigest of the secure hash of the image data computed using the algorithm whose name is the value of the os_hash_algo property. The value might be null (JSON null data type) if data has not yet been associated with this image, or if the image was created using a version of the Image Service API prior to version 2.7. (Since Image API v2.7)

owner

body

[‘null’, ‘string’]

An identifier for the owner of the image, usually the project (also called the “tenant”) ID. The value might be null (JSON null data type).

size

body

[‘null’, ‘integer’]

The size of the image data, in bytes. The value might be null (JSON null data type).

virtual_size

body

[‘null’, ‘integer’]

The virtual size of the image. The value might be null (JSON null data type).

container_format

body

[‘null’, ‘string’]

Format of the image container.

Values may vary based on the configuration available in a particular OpenStack cloud. See the Image Schema response from the cloud itself for the valid values available.

Example formats are: ami, ari, aki, bare, ovf, ova, or docker.

The value might be null (JSON null data type).

disk_format

body

[‘null’, ‘string’]

The format of the disk.

Values may vary based on the configuration available in a particular OpenStack cloud. See the Image Schema response from the cloud itself for the valid values available.

Example formats are: ami, ari, aki, vhd, vhdx, vmdk, raw, qcow2, vdi, ploop or iso.

The value might be null (JSON null data type).

Newton changes: The vhdx disk format is a supported value.

Ocata changes: The ploop disk format is a supported value.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC.

updated_at

body

string

The date and time when the resource was updated.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

If the updated_at date and time stamp is not set, its value is null.

direct_url

body

string

The URL to access the image file kept in external store. It is present only if the show_image_direct_url option is true in the Image service’s configuration file. Because it presents a security risk, this option is disabled by default.

min_ram

body

integer

Amount of RAM in MB that is required to boot the image. The value might be null (JSON null data type).

min_disk

body

integer

Amount of disk space in GB that is required to boot the image. The value might be null (JSON null data type).

self

body

string

The URL for the virtual machine image.

file

body

string

The URL for the virtual machine image file.

stores

body

string

Store in which image data resides. Only present when the operator has enabled multiple stores. May be a comma-separated list of store identifiers.

schema

body

string

The URL for the schema describing a virtual machine image.

404

Error

Shows details for an image. (Since Image API v2.0)

The response body contains a single image entity.

Preconditions

Normal response codes: 200

Error response codes: 400, 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

id

body

string

A unique, user-defined image UUID, in the format:

nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn

Where n is a hexadecimal digit from 0 to f, or F.

For example:

b2173dd3-7ad6-4362-baa6-a68bce3565cb

If you omit this value, the API generates a UUID for the image.

name

body

[‘null’, ‘string’]

The name of the image. Value might be null (JSON null data type).

status

body

string

The image status.

visibility

body

string

Image visibility, that is, the access permission for the image.

protected

body

boolean

A boolean value that must be false or the image cannot be deleted.

os_hidden

body

boolean

This field controls whether an image is displayed in the default image-list response. A “hidden” image is out of date somehow (for example, it may not have the latest updates applied) and hence should not be a user’s first choice, but it’s not deleted because it may be needed for server rebuilds. By hiding it from the default image list, it’s easier for end users to find and use a more up-to-date version of this image. (Since Image API v2.7)

checksum

body

[‘null’, ‘string’]

An MD5 hash over the image data. The value might be null (JSON null data type), as this field is no longer populated by the Image Service beginning with the Victoria release. It remains present for backward compatibility with legacy images. To validate image data, instead use the secure multihash fields os_hash_algo and os_hash_value.

os_hash_algo

body

[‘null’, ‘string’]

The algorithm used to compute a secure hash of the image data for this image. The result of the computation is displayed as the value of the os_hash_value property. The value might be null (JSON null data type). The algorithm used is chosen by the cloud operator; it may not be configured by end users. (Since Image API v2.7)

os_hash_value

body

[‘null’, ‘string’]

The hexdigest of the secure hash of the image data computed using the algorithm whose name is the value of the os_hash_algo property. The value might be null (JSON null data type) if data has not yet been associated with this image, or if the image was created using a version of the Image Service API prior to version 2.7. (Since Image API v2.7)

owner

body

[‘null’, ‘string’]

An identifier for the owner of the image, usually the project (also called the “tenant”) ID. The value might be null (JSON null data type).

size

body

[‘null’, ‘integer’]

The size of the image data, in bytes. The value might be null (JSON null data type).

virtual_size

body

[‘null’, ‘integer’]

The virtual size of the image. The value might be null (JSON null data type).

container_format

body

[‘null’, ‘string’]

Format of the image container.

Values may vary based on the configuration available in a particular OpenStack cloud. See the Image Schema response from the cloud itself for the valid values available.

Example formats are: ami, ari, aki, bare, ovf, ova, or docker.

The value might be null (JSON null data type).

disk_format

body

[‘null’, ‘string’]

The format of the disk.

Values may vary based on the configuration available in a particular OpenStack cloud. See the Image Schema response from the cloud itself for the valid values available.

Example formats are: ami, ari, aki, vhd, vhdx, vmdk, raw, qcow2, vdi, ploop or iso.

The value might be null (JSON null data type).

Newton changes: The vhdx disk format is a supported value.

Ocata changes: The ploop disk format is a supported value.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC.

updated_at

body

string

The date and time when the resource was updated.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

If the updated_at date and time stamp is not set, its value is null.

direct_url

body

string

The URL to access the image file kept in external store. It is present only if the show_image_direct_url option is true in the Image service’s configuration file. Because it presents a security risk, this option is disabled by default.

min_ram

body

integer

Amount of RAM in MB that is required to boot the image. The value might be null (JSON null data type).

min_disk

body

integer

Amount of disk space in GB that is required to boot the image. The value might be null (JSON null data type).

self

body

string

The URL for the virtual machine image.

file

body

string

The URL for the virtual machine image file.

stores

body

string

Store in which image data resides. Only present when the operator has enabled multiple stores. May be a comma-separated list of store identifiers.

schema

body

string

The URL for the schema describing a virtual machine image.

404

Error

(Since Image API v2.0) Deletes an image.

You cannot delete images with the protected attribute set to true (boolean).

Preconditions

Synchronous Postconditions

Normal response codes: 204

Error response codes: 400, 401, 403, 404, 409

Responses

204

Ok

404

Error

Shows tasks associated with an image. (Since Image API v2.12)

The response body contains list of tasks, possibly empty, associated with the specified image.

Preconditions

Normal response codes: 200

Error response codes: 404

Responses

200

Ok

Name

Location

Type

Description

first

body

string

next

body

string

schema

body

string

404

Error

Signals the Image Service to complete the image import workflow by processing data that has been made available to the OpenStack image service. (Since Image API v2.6)

In the glance-direct workflow, the data has been made available to the Image service via the Stage binary image data API call.

In the web-download workflow, the data is made available to the Image service by being posted to an accessible location with a URL that you know.

In the copy-image workflow, the data is made available to the Image service by copying existing image data to the staging area.

In the glance-download workflow, the data is made available to the Image service by fetching an image accessible from another glance service specified by a region name and an image id that you know.

Beginning with API version 2.8, an optional stores parameter may be added to the body request. When present, it contains the list of backing store identifiers to import the image binary data to. If at least one store identifier specified is not recognized, a 409 (Conflict) response is returned. When the parameter is not present, the image data is placed into the default backing store.

For backwards compatibility, if the stores parameter is not specified, the header ‘X-Image-Meta-Store’ is evaluated.

To import the data into the entire set of stores you may consume from this particular deployment of Glance without specifying each one of them, you can use the optional boolean body parameter all_stores. Note that this can’t be used simultaneously with the stores parameter.

To set the behavior of the import workflow in case of error, you can use the optional boolean body parameter all_stores_must_succeed. When set to True (default), if an error occurs during the upload in at least one store, the workflow fails, the data is deleted from stores where copying is done and the state of the image remains unchanged. When set to False, the workflow will fail only if the upload fails on all stores specified. In case of a partial success, the locations added to the image will be the stores where the data has been correctly uploaded.

The JSON request body specifies what import method you wish to use for this image request.

Preconditions

Before you can complete the interoperable image import workflow, you must meet the following preconditions:

Additional Preconditions

If you are using the glance-direct import method:

If you are using the web-download import method:

If you are using the copy-image import method:

If you are using the glance-download import method:

Synchronous Postconditions

Normal response codes: 202

Error response codes: 400, 401, 403, 404, 405, 409, 410, 413, 415, 503

If the image import process is not enabled in your cloud, this request will result in a 404 response code with an appropriate message.

Request

Responses

201

Ok

404

Error

Deactivates an image. (Since Image API v2.3)

By default, this operation is restricted to administrators only.

If you try to download a deactivated image, you will receive a 403 (Forbidden) response code. Additionally, only administrative users can view image locations for deactivated images.

The deactivate operation returns an error if the image status is not active or deactivated.

Preconditions

Normal response codes: 204

Error response codes: 400, 403, 404

Request

Responses

201

Ok

404

Error

Reactivates an image. (Since Image API v2.3)

By default, this operation is restricted to administrators only.

The reactivate operation returns an error if the image status is not active or deactivated.

Preconditions

Normal response codes: 204

Error response codes: 400, 403, 404

Request

Responses

201

Ok

404

Error

Downloads binary image data. (Since Image API v2.0)

Example call: curl -i -X GET -H "X-Auth-Token: $token" $image_url/v2/images/{image_id}/file

The response body contains the raw binary data that represents the actual virtual disk. The Content-Type header contains the application/octet-stream value. The Content-MD5 header contains an MD5 checksum of the image data. Use this checksum to verify the integrity of the image data.

Preconditions

Synchronous Postconditions

Normal response codes: 200, 204, 206

Error response codes: 400, 403, 404, 416

Responses

200

Ok

204

Ok

206

Ok

404

Error

Uploads binary image data. (Since Image API v2.0)

Set the Content-Type request header to application/octet-stream.

A multiple store backend support is introduced in the Rocky release as a part of the EXPERIMENTAL Image API v2.8.

Beginning with API version 2.8, an optional X-Image-Meta-Store header may be added to the request. When present, the image data will be placed into the backing store whose identifier is the value of this header. If the store identifier specified is not recognized, a 400 (Bad Request) response is returned. When the header is not present, the image data is placed into the default backing store.

Example call:

Preconditions

Before you can store binary image data, you must meet the following preconditions:

Synchronous Postconditions

Troubleshooting

Normal response codes: 204

Error response codes: 400, 401, 403, 404, 409, 410, 413, 415, 503

Responses

204

Ok

404

Error

Places the binary image data in a staging area. It is not stored in the storage backend and is not accessible for download until after the Image Import call is made. (Since Image API v2.6)

Set the Content-Type request header to application/octet-stream.

Example call:

Preconditions

Before you can stage binary image data, you must meet the following preconditions:

Synchronous Postconditions

Troubleshooting

Normal response codes: 204

Error response codes: 400, 401, 403, 404, 405, 409, 410, 413, 415, 503

If the image import process is not enabled in your cloud, this request will result in a 404 response code with an appropriate message.

Request

Responses

200

Ok

404

Error

Request of the images/image_id/tags/tag_value:put operation

Request

Responses

200

Ok

404

Error

Responses

204

Ok

404

Error

Lists the tenants that share this image. (Since Image API v2.1)

If the image owner makes this call, the complete member list is returned.

If a user who is an image member makes this call, the member list contains only information for that user.

If a user who is not an image member makes this call, the call returns the HTTP 404 response code.

Preconditions

Normal response codes: 200

Error response codes: 400, 401, 403, 404

Responses

200

Ok

Name

Location

Type

Description

first

body

string

next

body

string

schema

body

string

404

Error

Adds a tenant ID as an image member. (Since Image API v2.1)

Preconditions

Synchronous Postconditions

Troubleshooting

Normal response codes: 200

Error response codes: 400, 401, 403, 404, 409, 413

Request

Responses

201

Ok

Name

Location

Type

Description

member_id

body

string

The ID of the image member. An image member is usually a project (also called the “tenant”) with whom the image is shared.

image_id

body

string

The UUID of the image.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC.

updated_at

body

string

The date and time when the resource was updated.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

If the updated_at date and time stamp is not set, its value is null.

status

body

string

The status of this image member. Value is one of pending, accepted, rejected.

schema

body

string

The URL for the schema describing an image member.

404

Error

Shows image member details. (Since Image API v2.1)

Response body is a single image member entity.

Preconditions

Normal response codes: 200

Error response codes: 400, 401, 404

Responses

200

Ok

Name

Location

Type

Description

member_id

body

string

The ID of the image member. An image member is usually a project (also called the “tenant”) with whom the image is shared.

image_id

body

string

The UUID of the image.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC.

updated_at

body

string

The date and time when the resource was updated.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

If the updated_at date and time stamp is not set, its value is null.

status

body

string

The status of this image member. Value is one of pending, accepted, rejected.

schema

body

string

The URL for the schema describing an image member.

404

Error

Sets the status for an image member. (Since Image API v2.1)

This call allows an image member to change his or her member status.

When an image is shared with you, you have immediate access to the image. What updating your member status on the image does for you is that it affects whether the image will appear in your image list response.

For a more detailed discussion of image sharing, please consult Image API v2 Sharing.

Preconditions

Synchronous Postconditions

Normal response codes: 200

Error response codes: 400, 401, 404, 403

Request

Responses

200

Ok

Name

Location

Type

Description

member_id

body

string

The ID of the image member. An image member is usually a project (also called the “tenant”) with whom the image is shared.

image_id

body

string

The UUID of the image.

created_at

body

string

The date and time when the resource was created.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC.

updated_at

body

string

The date and time when the resource was updated.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

If the updated_at date and time stamp is not set, its value is null.

status

body

string

The status of this image member. Value is one of pending, accepted, rejected.

schema

body

string

The URL for the schema describing an image member.

404

Error

Deletes a tenant ID from the member list of an image. (Since Image API v2.1)

Preconditions

Synchronous Postconditions

Troubleshooting

Normal response codes: 204

Error response codes: 400, 401, 403, 404

Responses

204

Ok

404

Error

stores

This API allows you to delete a copy of the image from a specific store. (Since Image API v2.10)

Normal response codes: 204

Error response codes: 400, 401, 403, 404, 409

Responses

204

Ok

404

Error

tasks

Lists tasks.

Normal response codes: 200

Error response codes: 403, 404, 413

Responses

200

Ok

Name

Location

Type

Description

schema

body

string

The URI for the schema describing an image task list.

404

Error

Creates a task.

Normal response codes: 201

Error response codes: 401, 413, 415

Request

Responses

201

Ok

Name

Location

Type

Description

id

body

string

The UUID of the task.

type

body

string

The type of task represented by this content.

status

body

string

The current status of this task. The value can be pending, processing, success or failure.

input

body

[‘null’, ‘object’]

A JSON object specifying the input parameters to the task. Consult your cloud provider’s documentation for details.

result

body

[‘null’, ‘object’]

A JSON object specifying information about the ultimate outcome of the task. Consult your cloud provider’s documentation for details.

owner

body

string

An identifier for the owner of the task, usually the tenant ID.

message

body

string

Human-readable text, possibly an empty string, usually displayed in an error situation to provide more information about what has occurred.

image_id

body

string

Image associated with the task

request_id

body

string

Human-readable informative request-id

user_id

body

string

User associated with the task

expires_at

body

[‘null’, ‘string’]

Datetime when this resource would be subject to removal

created_at

body

string

The date and time when the task was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the task was updated.

The date and time stamp format is ISO 8601.

If the updated_at date and time stamp is not set, its value is null.

self

body

string

A URI for this task.

schema

body

string

The URI for the schema describing an image task.

404

Error

Shows details for a task.

Normal response codes: 200

Error response codes: 404

Responses

200

Ok

Name

Location

Type

Description

id

body

string

The UUID of the task.

type

body

string

The type of task represented by this content.

status

body

string

The current status of this task. The value can be pending, processing, success or failure.

input

body

[‘null’, ‘object’]

A JSON object specifying the input parameters to the task. Consult your cloud provider’s documentation for details.

result

body

[‘null’, ‘object’]

A JSON object specifying information about the ultimate outcome of the task. Consult your cloud provider’s documentation for details.

owner

body

string

An identifier for the owner of the task, usually the tenant ID.

message

body

string

Human-readable text, possibly an empty string, usually displayed in an error situation to provide more information about what has occurred.

image_id

body

string

Image associated with the task

request_id

body

string

Human-readable informative request-id

user_id

body

string

User associated with the task

expires_at

body

[‘null’, ‘string’]

The date and time when the task is subject to removal. While the task object, that is, the record describing the task is subject to deletion, the result of the task (for example, an imported image) still exists.

The date and time stamp format is ISO 8601.

This value is only set when the task reaches status success or failure. Otherwise its value is null. It may not appear in the response when its value is null.

created_at

body

string

The date and time when the task was created.

The date and time stamp format is ISO 8601.

updated_at

body

string

The date and time when the task was updated.

The date and time stamp format is ISO 8601.

If the updated_at date and time stamp is not set, its value is null.

self

body

string

A URI for this task.

schema

body

string

The URI for the schema describing an image task.

404

Error

Responses

204

Ok

404

Error

info

Returns information concerning the constraints around image import in the cloud in which the call is made, for example, supported container formats, supported disk formats, maximum image size, etc. This call contains a import-methods field consisting of an array of string identifiers indicating what import methods are supported in the cloud in which the call is made. (Since Image API v2.6)

Normal response codes: 200

Error response codes: 400, 401, 403

Responses

200

Ok

Name

Location

Type

Description

import-methods

body

object

A JSON object containing a value element, which is an array of string identifiers indicating what import methods are available in the cloud in which the call is made. This list may be empty.

import-methods.description

body

string

import-methods.type

body

string

404

Error

A multiple store backend support is introduced in the Rocky release as a part of the EXPERIMENTAL Image API v2.8.

In version 2.7 of the API, this call will return a 404 (Not Found). Use the API versions call to determine what API versions are available in your cloud.

Normal response codes: 200

Error response codes: 404

Responses

200

Ok

404

Error

The user’s quota and current usage are displayed, if enabled by server-side configuration.

Normal response codes: 200

Responses

200

Ok

404

Error

Lists all the backend stores, with detail, accessible to admins, for non-admin user API will return bad request.

Normal response codes: 200

Error response codes: 403, 404

Responses

200

Ok

404

Error

cache

Lists all images in cache or queue. (Since Image API v2.14)

Normal response codes: 200

Error response codes: 400, 401, 403

Responses

200

Ok

404

Error

Clears the cache and its queue. (Since Image API v2.14)

Normal response codes: 204

Error response codes: 400, 401, 403

Responses

204

Ok

404

Error

Queues image for caching. (Since Image API v2.14)

Normal response codes: 202

Error response codes: 400, 401, 403, 404

Request

Responses

200

Ok

404

Error

Deletes a image from cache. (Since Image API v2.14)

Normal response codes: 204

Error response codes: 400, 401, 403, 404

Responses

204

Ok

404

Error