Skip to content

Instance snapshots API reference

See https://docs.openstack.org/api-ref/compute/.

In these methods, {server_id} is the ID of the instance from which you want to create a snapshot, and {image_id} is the ID of the snapshot image. The snapshot creation endpoint triggers the creation of a new image, which represents the snapshot of the instance. Once created, the snapshot is managed as an image, where you can list, show details, update metadata, download, or delete it.

Create instance snapshot

Bash
POST /servers/{server_id}/action

Request body

JSON
{
  "createImage": {
    "name": "Snapshot Name",
    "metadata": {
      "key": "value"
    }
  }
}

List images (including snapshots)

Bash
GET /v2/images

Show image details (for a snapshot)

Bash
GET /v2/images/{image_id}

Delete image (delete a snapshot)

Bash
DELETE /v2/images/{image_id}

Update image metadata (for a snapshot)

Bash
PATCH /v2/images/{image_id}

Request body (example for updating name)

JSON
[
  {
    "op": "replace",
    "path": "/name",
    "value": "New Snapshot Name"
  }
]

Download image data (download a snapshot)

Bash
GET /v2/images/{image_id}/file