Image operations#

This section covers the following image operations:

Image Operations
Image Metadata Operations
Scheduled Images Operations

Note

To create an image, see Server Action Create Image.

Retrieve list of images#

GET /images

This operation lists IDs, names, and links for all images visible by the account.

The optional minDisk and minRam attributes set the minimum disk and RAM required to create a server with the image.

The image_type field in the response indicates whether the image is built-in (base) or custom (snapshot).

This table shows the possible response codes for this operation:

Response Code

Name

Description

200 203

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the query parameters for the request:

Name

Type

Description

server

Object

Filters the list of images by server. Specify the server reference by ID or by full URL.

name

String

Filters the list of images by image name.

status

Imagestatus

Filters the list of images by status. In- flight images have a status of SAVING and the conditional progress element contains a value from 0 to 100, which indicates the percentage completion. Other possible values for the status attribute include ACTIVE, DELETED, ERROR, SAVING, and UNKNOWN. Images with an ACTIVE status are available for use.

changes-since

Datetime

Filters the list of images to those that have changed since the changes-since time.

marker

Uuid

The ID of the last item in the previous list.

limit

Int

Sets the page size.

type

String

Filters Rackspace base images or any custom server images that you have created.

This operation does not accept a request body.

Example Retrieve list of images: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

This table shows the body parameters for the response:

Name

Type

Description

images

Array

The array of images.

images.id

Uuid

The image ID.

images.links

String

The array of image links for self and bookmark.

images.links.href

Uuid

The URL for the image and the associated rel.

images.links.rel

Uuid

The descriptive field for the associated href, which is either self, bookmark, or alternate.

images.links.type

Uuid

The alternate image type.

images. name

String

The image name.

Example Retrieve list of images: JSON response

The following example shows only a few images in the list for brevity.

Status Code: 200 OK
Content-Length: 26264
Content-Type: application/json
Date: Thu, 09 Jul 2015 15:53:01 GMT, Thu, 09 Jul 2015 15:53:04 GMT
Server: Jetty(9.2.z-SNAPSHOT)
Via: 1.1 Repose (Repose/6.2.1.2)
X-Compute-Request-Id: req-f0ce0b60-923f-4f02-aafe-090b95231323
{
  "images": [
    {
        "id": "6455fff1-1f0e-46e3-a795-6c88738d7280",
        "links": [
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/v2/820712/images/6455fff1-1f0e-46e3-a795-6c88738d7280",
                "rel": "self"
            },
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/820712/images/6455fff1-1f0e-46e3-a795-6c88738d7280",
                "rel": "bookmark"
            },
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/images/6455fff1-1f0e-46e3-a795-6c88738d7280",
                "type": "application/vnd.openstack.image",
                "rel": "alternate"
            }
        ],
        "name": "CentOS 7 (PVHVM)"
    },
    {
        "id": "fa26666f-b71b-492e-8bd9-d29eabc5b49f",
        "links": [
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/v2/820712/images/fa26666f-b71b-492e-8bd9-d29eabc5b49f",
                "rel": "self"
            },
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/820712/images/fa26666f-b71b-492e-8bd9-d29eabc5b49f",
                "rel": "bookmark"
            },
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/images/fa26666f-b71b-492e-8bd9-d29eabc5b49f",
                "type": "application/vnd.openstack.image",
                "rel": "alternate"
            }
        ],
        "name": "Ubuntu 15.04 (Vivid Vervet) (PVHVM)"
    },
    {
        "id": "33f0f56f-a9d2-4ffc-843f-94b80860f2c1",
        "links": [
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/v2/820712/images/33f0f56f-a9d2-4ffc-843f-94b80860f2c1",
                "rel": "self"
            },
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/820712/images/33f0f56f-a9d2-4ffc-843f-94b80860f2c1",
                "rel": "bookmark"
            },
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/images/33f0f56f-a9d2-4ffc-843f-94b80860f2c1",
                "type": "application/vnd.openstack.image",
                "rel": "alternate"
            }
        ],
        "name": "Gentoo 15.2 (PVHVM)"
    }
  ]
}

Retrieve list of images with details#

GET /images/detail

This operation returns details of all images in the response body.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the query parameters for the request:

Name

Type

Description

server

Object

Filters the list of images by server. Specify the server reference by ID or by full URL.

name

String

Filters the list of images by image name.

status

Imagestatus

Filters the list of images by status. In- flight images have a status of SAVING and the conditional progress element contains a value from 0 to 100, which indicates the percentage completion. Other possible values for the status attribute include ACTIVE, DELETED, ERROR, SAVING, and UNKNOWN. Images with an ACTIVE status are available for use.

changes-since

Datetime

Filters the list of images to those that have changed since the changes-since time.

marker

Uuid

The ID of the last item in the previous list.

limit

Int

Sets the page size.

type

String

Filters Rackspace base images or any custom server images that you have created.

This operation does not accept a request body.

Example Retrieve list of images with details: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

This table shows the body parameters for the response:

Name

Type

Description

images

Array

The array of images.

images.status

String

The image status, like ACTIVE.

images.updated

Date

The date and time that the image was last updated.

images.links

String

The array of image links for self and bookmark.

images.links.href

Uuid

The URL for the image and the associated rel.

images.links.rel

Uuid

The descriptive field for the associated href, which is either self, bookmark, or alternate.

images.links.type

Uuid

The alternate image type.

images.OS- DCF:diskConfig

String

The disk configuration value. Valid values are AUTO and MANUAL.

images.id

Uuid

The image ID.

images.updated

Date

The date and time that the image was last updated.

images.OS- EXT-IMG-SIZE:size

String

The image size.

images.name

String

The image name.

images.created

Date

The date and time that the image was created.

images.minDisk

Int

The minimum number of gigabytes of disk storage.

images.progress

Int

The completion percentage for an image. 100 indicates the image build is completed.

images.minRam

Int

The specified minimum amount of RAM in megabytes.

images.metadata

Array

Array of metadata key pairs containing information about the image.

Example Retrieve list of images with details: JSON response

The following example shows only a few images in the list for brevity.

Status Code: 200 OK
Content-Length: 91825
Content-Type: application/json
Date: Thu, 09 Jul 2015 16:16:03 GMT, Thu, 09 Jul 2015 16:16:06 GMT
Server: Jetty(9.2.z-SNAPSHOT)
Via: 1.1 Repose (Repose/6.2.1.2)
X-Compute-Request-Id: req-5e110eed-c310-4e8a-806f-313865f189bd
{
  "images": [
    {
      "status": "ACTIVE",
      "updated": "2015-07-09T16:12:57Z",
      "links": [
        {
          "href": "https://dfw.servers.api.rackspacecloud.com/v2/820712/images/28555e09-5639-43f9-b64b-9c98c78520ad",
          "rel": "self"
        },
        {
          "href": "https://dfw.servers.api.rackspacecloud.com/820712/images/28555e09-5639-43f9-b64b-9c98c78520ad",
          "rel": "bookmark"
        },
        {
          "href": "https://dfw.servers.api.rackspacecloud.com/images/28555e09-5639-43f9-b64b-9c98c78520ad",
          "type": "application/vnd.openstack.image",
          "rel": "alternate"
        }
      ],
      "OS-DCF:diskConfig": "MANUAL",
      "id": "28555e09-5639-43f9-b64b-9c98c78520ad",
      "OS-EXT-IMG-SIZE:size": 198846343,
      "name": "CoreOS (Alpha)",
      "created": "2015-07-09T14:48:20Z",
      "minDisk": 20,
      "progress": 100,
      "minRam": 512,
      "metadata": {
        "os_distro": "com.coreos",
        "os_type": "linux"
      }
    },
    {
      "status": "ACTIVE",
      "updated": "2015-07-09T10:23:14Z",
      "links": [
        {
          "href": "https://dfw.servers.api.rackspacecloud.com/v2/820712/images/8b8c73b6-689d-45d2-a7a4-33aae5e011f1",
          "rel": "self"
        },
        {
          "href": "https://dfw.servers.api.rackspacecloud.com/820712/images/8b8c73b6-689d-45d2-a7a4-33aae5e011f1",
          "rel": "bookmark"
        },
        {
          "href": "https://dfw.servers.api.rackspacecloud.com/images/8b8c73b6-689d-45d2-a7a4-33aae5e011f1",
          "type": "application/vnd.openstack.image",
          "rel": "alternate"
        }
      ],
      "OS-DCF:diskConfig": "AUTO",
      "id": "8b8c73b6-689d-45d2-a7a4-33aae5e011f1",
      "OS-EXT-IMG-SIZE:size": 1905244160,
      "name": "Daily-wordpress.voiceoversbycat.com-1436437083",
      "created": "2015-07-09T10:18:04Z",
      "minDisk": 20,
      "server": {
        "id": "8f64d643-f48a-459c-a7af-717dfc7580ee",
        "links": [
          {
            "href": "https://dfw.servers.api.rackspacecloud.com/v2/820712/servers/8f64d643-f48a-459c-a7af-717dfc7580ee",
            "rel": "self"
          },
          {
            "href": "https://dfw.servers.api.rackspacecloud.com/820712/servers/8f64d643-f48a-459c-a7af-717dfc7580ee",
            "rel": "bookmark"
          }
        ]
      },
      "progress": 100,
      "minRam": 512,
      "metadata": {
        "os_distro": "ubuntu",
        "os_type": "linux"
      }
    }
  ]
}

Retrieve image details#

GET /images/{image_id}

This operation retrieves details of a specified image.

Specify the image ID in the URI.

This operation returns details of the specified image in the response body. The image_type field in the response indicates whether the image is built-in (base) or custom (snapshot).

Note

The response body does not include the serverId field. To retrieve the serverId field, get details for all images.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200 203

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

Uuid

The UUID for the image.

This operation does not accept a request body.

Example Retrieve image details: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

This table shows the body parameters for the response:

Name

Type

Description

image

Object

The container of image details.

image.status

String

The image status, like ACTIVE.

image.updated

Date

The date and time that the image was last updated.

image.links

String

The array of image links for self and bookmark.

image.links.href

Uuid

The URL for the image and the associated rel.

image.links.rel

Uuid

The descriptive field for the associated href, which is either self, bookmark, or alternate.

image.links.type

Uuid

The alternate image type.

image.OS- DCF:diskConfig

String

The disk configuration value. Valid values are AUTO and MANUAL.

image.id

Uuid

The image ID.

image.OS- EXT-IMG-SIZE:size

String

The image size.

image. name

String

The image name.

image.created

Date

The date and time that the image was created.

image.minDisk

Int

The minimum number of gigabytes of disk storage.

image.server

Object

The container of server attributes for the image.

image.progress

Int

The completion percentage for an image. 100 indicates the image build is completed.

image.minRam

Int

The specified minimum amount of RAM in megabytes.

image.metadata

Array

Array of metadata key pairs containing information about the image.

Example Retrieve image details: JSON response

Status Code: 200 OK
Content-Length: 2230
Content-Type: application/json
Date: Thu, 09 Jul 2015 18:24:01 GMT, Thu, 09 Jul 2015 18:24:02 GMT
Server: Jetty(9.2.z-SNAPSHOT)
Via: 1.1 Repose (Repose/6.2.1.2)
X-Compute-Request-Id: req-5ba3fae8-5daf-48c7-9be1-6de842e50ca9
{
  "image": {
    "status": "ACTIVE",
    "updated": "2013-06-07T17:00:39Z",
    "links": [
      {
        "href": "https://dfw.servers.api.rackspacecloud.com/v2/820712/images/e3d37ab2-8dc0-4000-b773-b15aad79ad0a",
        "rel": "self"
      },
      {
        "href": "https://dfw.servers.api.rackspacecloud.com/820712/images/e3d37ab2-8dc0-4000-b773-b15aad79ad0a",
        "rel": "bookmark"
      },
      {
        "href": "https://dfw.servers.api.rackspacecloud.com/images/e3d37ab2-8dc0-4000-b773-b15aad79ad0a",
        "type": "application/vnd.openstack.image",
        "rel": "alternate"
      }
    ],
    "OS-DCF:diskConfig": "MANUAL",
    "id": "e3d37ab2-8dc0-4000-b773-b15aad79ad0a",
    "OS-EXT-IMG-SIZE:size": 5562828800,
    "name": "voweb1-firstimage",
    "created": "2013-06-07T16:38:49Z",
    "minDisk": 40,
    "server": {
      "id": "f879f81a-5455-4e57-a0aa-3773e21c2259",
      "links": [
        {
          "href": "https://dfw.servers.api.rackspacecloud.com/v2/820712/servers/f879f81a-5455-4e57-a0aa-3773e21c2259",
          "rel": "self"
        },
        {
          "href": "https://dfw.servers.api.rackspacecloud.com/820712/servers/f879f81a-5455-4e57-a0aa-3773e21c2259",
          "rel": "bookmark"
        }
      ]
    },
    "progress": 100,
    "minRam": 1024,
    "metadata": {
      "image_type": "snapshot",
      "instance_type_rxtx_factor": "3",
      "auto_disk_config": "False",
      "os_type": "windows"
    }
  }
}

Delete image#

DELETE /images/{image_id}

This operation deletes the specified image from the system. Images are immediately removed.

Specify the image ID in the URI.

This table shows the possible response codes for this operation:

Response Code

Name

Description

204

Delete Successful

Delete request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

Uuid

The UUID for the image.

This operation does not accept a request body.

Example Delete image: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

Example Delete image: JSON response

Status Code: 204 No Content
Content-Type: text/html; charset=UTF-8
Date: Thu, 09 Jul 2015 18:52:29 GMT, Thu, 09 Jul 2015 18:52:30 GMT
Server: Jetty(9.2.z-SNAPSHOT)
Via: 1.1 Repose (Repose/6.2.1.2)
X-Compute-Request-Id: req-e1b75723-1027-48c0-aeea-008a9b038370

Retrieve image metadata for specified image#

GET /images/{image_id}/metadata

This operation shows all metadata for an image.

Specify the image ID in the URI.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200 203

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

Uuid

The UUID for the image.

This operation does not accept a request body.

Example Retrieve image metadata for specified image: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

This table shows the body parameters for the response:

Name

Type

Description

metadata

Object

The container of metadata for images.

Example Retrieve image metadata for specified image: JSON response

Status Code: 200 OK
Content-Length: 1192
Content-Type: application/json
Date: Fri, 10 Jul 2015 21:05:50 GMT, Fri, 10 Jul 2015 21:05:51 GMT
Server: Jetty(9.2.z-SNAPSHOT)
Via: 1.1 Repose (Repose/6.2.1.2)
X-Compute-Request-Id: req-5a2edb56-aa6d-47fc-8124-2cba94d1c7a7
{
  "metadata": {
    "com.rackspace__1__options": "4",
    "instance_type_name": "1GB Standard Instance",
    "com.rackspace__1__release_version": "3",
    "instance_type_vcpus": "1",
    "com.rackspace__1__release_id": "2100",
    "com.rackspace__1__build_core": "1",
    "base_image_ref": "d47aeca3-38d6-4dcb-bccf-534492986ae0",
    "org.openstack__1__os_distro": "com.microsoft.server",
    "image_type": "snapshot",
    "org.openstack__1__os_version": "2008.2",
    "instance_type_ephemeral_gb": "0",
    "com.rackspace__1__build_managed": "1",
    "org.openstack__1__architecture": "x64",
    "com.rackspace__1__visible_core": "1",
    "instance_type_vcpu_weight": "12",
    "instance_type_root_gb": "40",
    "instance_type_id": "3",
    "com.rackspace__1__release_build_date": "2013-04-16",
    "instance_type_rxtx_factor": "3",
    "auto_disk_config": "False",
    "user_id": "346289",
    "com.rackspace__1__visible_managed": "1",
    "instance_uuid": "f879f81a-5455-4e57-a0aa-3773e21c2259",
    "instance_type_memory_mb": "1024",
    "instance_type_swap": "1024",
    "com.rackspace__1__build_rackconnect": "1",
    "instance_type_flavorid": "3",
    "com.rackspace__1__visible_rackconnect": "1",
    "os_type": "windows",
    "rax_activation_profile": "windows",
    "com.rackspace__1__source": "kickstart"
  }
}

Set image metadata for specified image#

POST /images/{image_id}/metadata

This operation sets metadata for an image that you previously created.

If your request includes keys that do not exist, they will be added. If it includes existing metadata keys, those entries will be changed to match the keys in the request body.

Specify the image ID in the URI.

The optional key, auto_disk_config, determines how a cloud server’s root disk partition is handled when the server is started or resized. It has the following possible user-selectable values:

  • TRUE:

    The root partition is expanded to encompass all of the available virtual disk. This setting results in an OS_DCF:diskConfig value of AUTO on a server built with this image.

  • FALSE:

    The root partition remains the same size as the original image. Extra virtual disk is seen as unformatted free space by the operating system. This setting results in an OS_DCF:diskConfig value of MANUAL on a server built with this image.

The non-user-selectable value DISABLED results in an OS_DCF:diskConfig value of MANUAL on a server built with this image.

The auto_disk_config key is related to, and can actually control, the available Disk Configuration Extension attribute: OS-DCF:diskConfig.

Warning

We do not advise changing auto_disk_config during resizes, even when allowed, since it can have unintended consequences.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200 203

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

Uuid

The UUID for the image.

Example Set image metadata for specified image: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json
{
    "metadata": {
        "Category": "Webserver Retail Outlet project",
        "Owner": "John, Doe",
        "Label": "Updated"
    }
}

Response#

This table shows the body parameters for the response:

Name

Type

Description

metadata

Object

The container of metadata for images.

Example Set image metadata for specified image: JSON response

Status Code: 200 OK
Content-Length: 870
Content-Type: application/json
Date: Wed, 15 Jul 2015 16:21:10 GMT, Wed, 15 Jul 2015 16:21:11 GMT
Server: Jetty(9.2.z-SNAPSHOT)
Via: 1.1 Repose (Repose/6.2.1.2)
X-Compute-Request-Id: req-a7b3db00-0692-473d-93d3-e330eabc58b1
{
  "metadata": {
    "com.rackspace__1__options": "0",
    "owner": "John, Doe",
    "base_image_ref": "ffa476b1-9b14-46bd-99a8-862d1d94eb7a",
    "category": "Webserver-Beta Retail Outlet project",
    "os_distro": "ubuntu",
    "label": "Updated",
    "auto_disk_config": "True",
    "os_type": "linux"
  }
}

Retrieve image metadata item for specified image#

GET /images/{image_id}/metadata/{key}

This operation shows a metadata item for an image.

Specify the image ID and metadata key in the URI.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200 203

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

Uuid

The UUID for the image.

{key}

Uuid

The key of the image metadata item.

This operation does not accept a request body.

Example Retrieve image metadata item for specified image: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

This table shows the body parameters for the response:

Name

Type

Description

meta

Object

The container of metadata for images. Within this container, there may be one or more metadata key pairs.

Example Retrieve image metadata item for specified image: JSON response

Status Code: 200 OK
Content-Length: 30
Content-Type: application/json
Date: Wed, 15 Jul 2015 16:41:34 GMT, Wed, 15 Jul 2015 16:41:35 GMT
Server: Jetty(9.2.z-SNAPSHOT)
Via: 1.1 Repose (Repose/6.2.1.2)
X-Compute-Request-Id: req-b2fd2096-9050-48b8-89d4-a95f37f6c07d
{
  "meta": {
    "label": "Updated"
  }
}

Set image metadata item for specified image#

PUT /images/{image_id}/metadata/{key}

This operation sets metadata for an image that you previously created.

If your request includes keys that do not exist, they will be added. If it includes existing metadata keys, those entries will be changed to match the keys in the request body.

Specify the image ID and metadata key in the URI.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200 203

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

Uuid

The UUID for the image.

{key}

Uuid

The key of the image metadata item.

This table shows the body parameters for the request:

Name

Type

Description

meta

Object

The container of metadata for images. Within this container, there may be one or more metadata key pairs.

Example Set image metadata item for specified image: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json
{
  "meta": {
    "label": "Replaced"
  }
}

Response#

This table shows the body parameters for the response:

Name

Type

Description

meta

Object

The container of metadata for images. Within this container, there may be one or more metadata key pairs.

Example Set image metadata item for specified image: JSON response

Status Code: 200 OK
Content-Length: 31
Content-Type: application/json
Date: Wed, 15 Jul 2015 16:46:44 GMT, Wed, 15 Jul 2015 16:46:45 GMT
Server: Jetty(9.2.z-SNAPSHOT)
Via: 1.1 Repose (Repose/6.2.1.2)
X-Compute-Request-Id: req-7a75bb96-54eb-4847-a73c-4f697f42b175
{
  "meta": {
    "label": "Replaced"
  }
}

Delete image metadata item for specified image#

DELETE /images/{image_id}/metadata/{key}

This operation deletes a metadata for an image.

Specify the image ID and metadata key in the URI.

This table shows the possible response codes for this operation:

Response Code

Name

Description

204

Success

No Content.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

Uuid

The UUID for the image.

{key}

Uuid

The key of the image metadata item.

This operation does not accept a request body.

Example Delete image metadata item for specified image: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

Example Delete image metadata item for specified image: JSON response

HTTP/1.1 204 No Content
Date: Wed, 15 Jul 2015 17:05:13 GMT
Via: 1.1 Repose (Repose/6.2.1.2)
Date: Wed, 15 Jul 2015 17:05:13 GMT
Content-Type: application/json
X-Compute-Request-Id: req-b34ee94e-1760-4f75-8073-978f75d68c3d
Server: Jetty(9.2.z-SNAPSHOT)

Enable scheduled Images#

POST /servers/{server_id}/rax-si-image-schedule

This operation enables scheduled images on a server, by creating a image_schedule resource. When your images are created, they are named according to one of the following schemes:

  • daily-{server-name}-{10-digit-number}

  • weekly-{server-name}-{10-digit-number}

Image names are limited to 255 characters. The {server-name} may be truncated, if necessary, for the scheduled snapshot image name to meet this limit.

If you want to change from daily to weekly scheduled images, simply post a new request containing the day of week and the retention value you desire. Likewise, if you want to switch from weekly to daily scheduled images, simply post a new request containing only a retention value.

In the URI, specify the server ID.

In the request body, for both daily and weekly requests, specify retention specifies the number of scheduled images created by the scheduled images service to keep for a server. The retention value must be a positive integer from 1 to 65,535 (the system limit).

In the request body, for weekly requests, specify day_of_week, which indicates the day for image creation.

Note

Regarding Retention:

  • Excess scheduled image removal will be done at the time the scheduled images service successfully adds a new snapshot to your account.

  • The way the scheduled images service recognizes that an image is eligible for removal is by locating the following user metadata on the image: org.openstack__1__created-by: scheduled-images-service. To save a scheduled image so that it is not eligible for retention culling, simply remove this metadata element. We do not recommend adding the above metadata element to an image manually.

  • If a retention value has already been specified for a server, it is overridden.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{server_id}

Uuid

The UUID for the server.

This table shows the body parameters for the request:

Name

Type

Description

image_schedule

Object

The container for the image schedule.

image_schedule.retention

Int

The number of days that an Image should be retained.

image_schedule.day_of_week

String (Optional)

The chosen day of the week for the image creation. The allowed values for this field are: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY.

Example Enable scheduled images (daily): JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json
{
    "image_schedule" : {
         "retention": 7
    }
}

Example Enable scheduled images (weekly): JSON request

{
     "image_schedule": {
           "retention": 5,
           "day_of_week": "SATURDAY"
     }
}

Response#

This table shows the body parameters for the response:

Name

Type

Description

image_schedule

Object

The container for the image schedule.

image_schedule.retention

Int

The number of days that an Image should be retained.

image_schedule.day_of_week

String

The chosen day of the week for the image creation. The allowed values for this field are: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY.

Example Enable scheduled images (daily): JSON response

Status Code: 200 OK
Content-Length: 36
Content-Type: application/json
Date: Thu, 29 Jan 2015 22:53:45 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
Via: 1.1 Repose (Repose/2.12)
x-compute-request-id: req-5d33237d-0f96-4d13-a057-5ab2b1b46f71
{
  "image_schedule": {
    "retention": 7
  }
}

Example Enable scheduled images (weekly): JSON response

Status Code: 200 OK
Content-Length: 63
Content-Type: application/json
Date: Thu, 29 Jan 2015 18:25:01 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
Via: 1.1 Repose (Repose/2.12)
x-compute-request-id: req-f90ae0d1-e0d8-407b-9af0-f4ed79935991
{
  "image_schedule": {
    "day_of_week": "SATURDAY",
    "retention": 5
  }
}

Show scheduled Images#

GET /servers/{server_id}/rax-si-image-schedule

This operation shows scheduled images for the specified server.

This operation returns the retention value if the server has scheduled images enabled. For weekly images, the response also includes the scheduled day of the week for the image. If the server has scheduled images disabled, an HTTP 404 is returned.

In the URI, specify the server ID.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200 203

Success

Request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{server_id}

Uuid

The UUID for the server.

This operation does not accept a request body.

Example Show scheduled Images: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

This table shows the body parameters for the response:

Name

Type

Description

image_schedule

Object (Required)

The container for the image schedule.

image_schedule.retention

Int (Required)

The number of days that an Image should be retained.

image_schedule.day_of_week

String (Optional)

The chosen day of the week for the image creation. The allowed values for this field are: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY.

Example Show scheduled images (daily - success): JSON response

Status Code: 200 OK
Content-Length: 36
Content-Type: application/json
Date: Thu, 29 Jan 2015 22:53:45 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
Via: 1.1 Repose (Repose/2.12)
x-compute-request-id: req-5d33237d-0f96-4d13-a057-5ab2b1b46f71
{
  "image_schedule": {
    "retention": 7
  }
}

Example Show scheduled images (weekly - success): JSON response

Status Code: 200 OK
Content-Length: 63
Content-Type: application/json
Date: Thu, 29 Jan 2015 18:25:01 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
Via: 1.1 Repose (Repose/2.12)
x-compute-request-id: req-f90ae0d1-e0d8-407b-9af0-f4ed79935991
{
  "image_schedule": {
    "day_of_week": "SATURDAY",
    "retention": 5
  }
}

Example Show scheduled images (not found): JSON response

Status Code: 404 Not Found
Content-Length: 123
Content-Type: application/json; charset=UTF-8
Date: Thu, 29 Jan 2015 22:24:11 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
Via: 1.1 Repose (Repose/2.12)
x-compute-request-id: req-e20a9646-e225-403b-9e81-53c22728cbaf
{
  "itemNotFound": {
    "message": "Image schedule does not exist for server 4a24d643-f48a-459c-a7af-939dfc7580ee",
    "code": 404
  }
}

Disable scheduled Images#

DELETE /servers/{server_id}/rax-si-image-schedule

This operation disables scheduled images by deleting the image_schedule resource that indicates the scheduled image service should create snapshots of this server. Thus scheduled images will no longer be created.

This table shows the possible response codes for this operation:

Response Code

Name

Description

202

Delete Successful

Delete request succeeded.

400

Error

A general error has occured.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

409

Conflicting Reqest

Conflicting request.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{server_id}

Uuid

The UUID for the server.

This operation does not accept a request body.

Example Disable scheduled Images: JSON request

X-Auth-Token: f064c46a782c444cb4ba4b6434288f7c
Content-Type: application/json
Accept: application/json

Response#

Example Disable scheduled Images: JSON response

Status Code: 202 Accepted
Content-Length: 0
Content-Type: text/html;charset=UTF-8
Date: Thu, 29 Jan 2015 18:51:38 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
Via: 1.1 Repose (Repose/2.12)
x-compute-request-id: req-2e8174d0-414d-4609-863c-f538ca1cae83