• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V3 Interfaces
  5. Snapshot
  6. List Snapshots

List Snapshots

Function Description

This interface is used to query snapshots of a volume.

Interface Format

Method

URI

Description

GET

/v3/{project_id}/snapshots

Queries the list of snapshots of a volume.

Restrictions

N/A

Request Parameter

Request filtering parameters

Parameter

Type

Mandatory

Remarks

offset

Int

No

Specifies the offset of the query results.

limit

Int

No

Specifies the limit of the number of returned results. The value is an integer greater than 0.

name

String

No

Specifies the volume snapshot name. The value is a string of less than 255 characters.

status

String

No

Specifies the volume snapshot status. The value can be available or error.

volume_id

Uuid

No

Specifies the volume ID corresponding to the volume snapshot.

Response Parameter

Parameter

Type

Mandatory

Remarks

id

Uuid

Yes

Specifies the ID of the volume snapshot.

status

String

Yes

Specifies the status of the volume snapshot.

name

String

No

Specifies the name of the volume snapshot.

description

String

No

Specifies the descriptive information about the volume snapshot.

created_at

String

Yes

Specifies the time when the volume snapshot was created.

metadata

Dict

No

Specifies the metadata of the volume snapshot.

volume_id

Uuid

Yes

Specifies the volume to which the snapshot belongs.

size

Int

Yes

Specifies the size of the volume snapshot.

Request Example

GET https://volume.localdomain.com:8776/v3/d6c277ba8820452e83df36f33c9fa561/snapshots

Response Example

{
    "snapshots": [
        {
            "created_at": "2016-02-16T16:54:14.981520", 
            "description": null, 
            "id": "b836dc3d-4e10-4ea4-a34c-8f6b0460a583", 
            "metadata": {}, 
            "name": "test01", 
            "size": 1, 
            "status": "available", 
            "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209"
        }, 
        {
            "created_at": "2016-02-16T16:54:19.475397", 
            "description": null, 
            "id": "83be494d-329e-4a78-8ac5-9af900f48b95", 
            "metadata": {}, 
            "name": "test02", 
            "size": 1, 
            "status": "available", 
            "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209"
        }, 
        {
            "created_at": "2016-02-16T16:54:24.367414", 
            "description": null, 
            "id": "dd360f46-7593-4d35-8f2c-5566fd0bd79e", 
            "metadata": {}, 
            "name": "test03", 
            "size": 1, 
            "status": "available", 
            "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209"
        }, 
        {
            "created_at": "2016-02-16T16:54:29.766740", 
            "description": null, 
            "id": "4c29796a-8cf4-4482-9afc-e66da9a81240", 
            "metadata": {}, 
            "name": "test04", 
            "size": 1, 
            "status": "available", 
            "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209"
        }
    ]
}

Error Code

See section Processing Return Code.