• Native OpenStack API

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

List Volumes Summaries

Function Description

This interface is used to query volume summaries and only allows you to query databases.

Interface Format

Method

URI

Description

GET

/v3/{project_id}/volumes

Queries volume summaries.

Restrictions

N/A

Extension Description

Extension reason: This interface is extended to support the shareable volume feature and allows you to specify the time for querying.

Extension method:

  1. The query results can be filtered based on the value of change-since.
  2. This interface is extended to enable fuzzy queries of a volume using namedescription, and id.

Request Parameter

request filter parameters

Parameter

Type

Mandatory

Remarks

marker

String

No

Specifies the ID of the last record on the previous page.

name

String

No

Specifies the volume name.

The value is a string of less than 255 characters.

limit

Int

No

Specifies the limit of the number of returned results.

The value is an integer that is greater than 0.

sort_key

String

No

Sorts query results based on keys. By default, the results are sorted by created_at.

sort_dir

String

No

Specifies the sort method. By default, desc is used.

offset

Int

No

Specifies the allowed offset.

status

String

No

Specifies the status of the volume, including availablein-useerrorerror_deleting, and extending.

metadata

String

No

Specifies the metadata of the volume.

availability-zone

String

No

Specifies the AZ information.

changes-since

String

No

Specifies the date and time when the volume was updated. It is an extended attribute.

An example of the time format is as follows: 2016-01-08T09:41:18.

This parameter is valid only for administrator operations.

Response Parameter

Parameter

Type

Mandatory

Remarks

id

Uuid

Yes

Specifies the volume ID.

links

List(Dict)

Yes

Specifies the volume URI description.

name

String

No

Specifies the volume name.

volumes_links

List

No

Specifies the links of the volume list. This parameter is independent of volumes in the response body. If only part of the volume list information is obtained, the return information may contain the volume_links field.

Request Example

GET https://volume.localdomain.com:8776/v3/dd14c6ac581f40059e27f5320b60bf2f/volumes?limit=3

Response Example

{
    "volumes": [
        {
            "id": "6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
            "links": [
                {
                    "href": "https://volume.localdomain.com:8776/v3/dd14c6ac581f40059e27f5320b60bf2f/volumes/6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
                    "rel": "self"
                },
                {
                    "href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
                    "rel": "bookmark"
                }
            ],
            "name": "zjb_u25_test"
        },
        {
            "id": "2bce4552-9a7d-48fa-8484-abbbf64b206e",
            "links": [
                {
                    "href": "https://volume.localdomain.com:8776/v3/dd14c6ac581f40059e27f5320b60bf2f/volumes/2bce4552-9a7d-48fa-8484-abbbf64b206e",
                    "rel": "self"
                },
                {
                    "href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/2bce4552-9a7d-48fa-8484-abbbf64b206e",
                    "rel": "bookmark"
                }
            ],
            "name": "zjb_u25_test"
        },
        {
            "id": "3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
            "links": [
                {
                    "href": "https://volume.localdomain.com:8776/v3/dd14c6ac581f40059e27f5320b60bf2f/volumes/3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
                    "rel": "self"
                },
                {
                    "href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
                    "rel": "bookmark"
                }
            ],
            "name": "zjb_u25_test"
        }
    ],
    "volumes_links": [
        {
            "href": "https://volume.localdomain.com:8776/v3/dd14c6ac581f40059e27f5320b60bf2f/volumes?limit=3&marker=3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
            "rel": "next"
        }
    ]
}

Error Code

See section Processing Return Code.