8.1. Listing snapshots

GET /v3/{project_id}/snapshots

Lists all volume snapshots, with summary information that the project can access.

Source: https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-accessible-snapshots

8.1.1. Request

Name In Type Description
project_id path string The UUID of the project in a multi-tenancy cloud.
all_tenants (Optional) query string Shows details for all projects. Admin only.
sort (Optional) query string Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).
limit (Optional) query integer Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
offset (Optional) query integer Used in conjunction with limit to return a slice of items. offset is where to start in the list.
marker (Optional) query string The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
with_count (Optional) query boolean

Whether to show count in API response or not, default is False.

New in version 3.45

8.1.1.1. Example

# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:8776/v3/f5d834d636c642c7bfe8af86139c6f26/snapshots

8.1.2. Response

Name In Type Description
status body string The status for the snapshot.
description body string A description for the snapshot.
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.

name body string The name of the Volume Transfer.
user_id body string

The UUID of the user.

New in version 3.41

volume_id body string If the snapshot was created from a volume, the volume ID.
metadata body object One or more metadata key and value pairs for the snapshot, if any.
id body string The snapshot UUID.
size body integer The size of the volume, in gibibytes (GiB).
count (Optional) body integer

The total count of requested resource before pagination is applied.

New in version 3.45

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.

snapshots_links (Optional) body array Links for the snapshot.

8.1.2.1. Status codes

8.1.2.1.1. Success

Code Reason
200 - OK Request was successful.

8.1.2.1.2. Error

Code Reason
400 - Bad Request Some content in the request was invalid.

8.1.2.2. Example

{
  "snapshots": [
    {
      "status": "available",
      "size": 2,
      "metadata": {},
      "name": "Snapshot-vol1/2020-03-11 05:01:53",
      "volume_id": "cb623b3c-f14a-48d6-a339-d9fda95be662",
      "created_at": "2020-03-11T14:01:54.381048",
      "description": null,
      "id": "aebe052f-6c13-417a-8ea9-771f40d6667f",
      "updated_at": "2020-03-11T14:01:56.522040"
    }
  ]
}