7.1. Listing volumes¶
GET /v3/{project_id}/volumes
List summary information for all block storage volumes that the project can access.
Source: https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-accessible-volumes
7.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 New in version 3.45 |
created_at (Optional) |
query | string | Filters reuslts by a time that resources are created at with time comparison operators: gt/gte/eq/neq/lt/lte. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm. The ±hh:mm value, if included, returns the time zone as an offset from UTC. New in version 3.60 |
updated_at (Optional) |
query | string | Filters reuslts by a time that resources are updated at with time comaprison operators: gt/gte/eq/neq/lt/lte. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm. The ±hh:mm value, if included, returns the time zone as an offset from UTC. New in version 3.60 |
7.1.1.1. Example¶
# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes
7.1.2. Response¶
Name | In | Type | Description |
---|---|---|---|
volumes |
body | array | A list of volume objects. |
id |
body | string | The UUID of the volume. |
links |
body | array | The volume links. |
name |
body | string | The volume name. |
volumes_links (Optional) |
body | array | The volume links. |
count (Optional) |
body | integer | The total count of requested resource before pagination is applied. New in version 3.45 |
7.1.2.1. Status codes¶
7.1.2.1.1. Success¶
Code | Reason |
---|---|
200 - OK |
Request was successful. |
7.1.2.1.2. Error¶
Code | Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
7.1.2.2. Example¶
{
"volumes": [
{
"id": "cb623b3c-f14a-48d6-a339-d9fda95be662",
"links": [
{
"href": "https://<node_IP_addr>:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes/cb623b3c-f14a-48d6-a339-d9fda95be662",
"rel": "self"
},
{
"href": "https://<node_IP_addr>:8776/f5d834d636c642c7bfe8af86139c6f26/volumes/cb623b3c-f14a-48d6-a339-d9fda95be662",
"rel": "bookmark"
}
],
"name": "vol1"
},
{
"id": "76736e1a-ad97-4599-8ca8-476650459310",
"links": [
{
"href": "https://<node_IP_addr>:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes/76736e1a-ad97-4599-8ca8-476650459310",
"rel": "self"
},
{
"href": "https://<node_IP_addr>:8776/f5d834d636c642c7bfe8af86139c6f26/volumes/76736e1a-ad97-4599-8ca8-476650459310",
"rel": "bookmark"
}
],
"name": "vm1/cirros/Boot volume"
}
]
}