List volumes¶
Overview¶
Lists summary information for all Block Storage volumes that the tenant who submits the request can access.
Classification¶
- List
API Operation Object¶
- volumes
Synchronous / Asynchronous¶
- synchronous
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/{tenant_id}/volumes
HTTP Request Header¶
Format¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: <token_id>
HTTP Request Body¶
Format¶
- none
Request Parameter¶
name | style | format | description | required/optional | default value | action for invalid parameter | response code for invalid parameter |
---|---|---|---|---|---|---|---|
tenant_id | URL | UUID(3) | ID of the tenant | required | - | Terminate | 400 |
token_id | Header | String(token_id) | Keystone admin token | required | - | Terminate | 401 |
marker | Query | UUID | UUID of the server at which you want to set a marker. | optional | - | Terminate | 400 |
limit | Query | int | Integer value for the limit of values to return. | optional | - | Terminate | 400 |
page_size | Query | int | page size for result | optional | - | Terminate | 400 |
created_at | Query | time/date | created time | optional | - | - | - |
updated_at | Query | time/date | last updated time | optional | - | - | - |
id | Query | UUID | volume id | optional | - | - | - |
ec2_id | Query | String(1-255characters) | ec2_id is not used by juno | optional | - | - | - |
user_id | Query | String(1-255characters) | volume owner | optional | - | - | - |
project_id | Query | UUID(3) | project id | optional | - | - | - |
host | Query | String | host name | optional | - | - | - |
size | Query | int | volume size | optional | - | - | - |
availability_zone | Query | String | availability zone name | optional | - | - | - |
instance_uuid | Query | UUID(2) | instance ID given volume | optional | - | - | - |
mountpoint | Query |
|
device name | optional | - | - | - |
attach_time | Query | time/date | attached time | optional | - | - | - |
status | Query | String | volume state | optional | - | - | - |
attach_status | Query | detached or attached | attach state | optional | - | - | - |
scheduled_at | Query | time/date | scheduled time | optional | - | - | - |
launched_at | Query | time/date | launched a time | optional | - | - | - |
terminated_at | Query | time/date | terminated time | optional | - | - | - |
display_name | Query | String(0-256characters) or null | volume name | optional | - | - | - |
display_description | Query | String(0-255characters) or null | volume description | optional | - | - | - |
provider_location | Query | String(1-255characters) | volume location | optional | - | - | - |
provider_auth | Query | String(1-255characters) | volume provider's auth information | optional | - | - | - |
snapshot_id | Query | UUID or null | (volume) snapshot ID that becomes source data of the volume. | optional | - | - | - |
volume_type_id | Query | UUID | volume type id | optional | - | - | - |
source_volid | Query | UUID | source volume id | optional | - | - | - |
bootable | Query | true or false | whether bootable or not | optional | - | - | - |
attached_host | Query | String(1-255characters) | attached host name | optional | - | - | - |
provider_geometry | Query | String(1-255characters) | solidfire driver only uses | optional | - | - | - |
_name_id | Query | UUID | volume id of temporary volume for migrating. | optional | - | - | - |
encryption_key_id | Query | UUID | encryption id | optional | - | - | - |
migration_status | Query | migrate_state | migrate state | optional | - | - | - |
replication_status | Query | replication_state | replication state | optional | - | - | - |
replication_extended_status | Query | String(0-255characters) | Extended state for volume replication. | optional | - | - | - |
replication_driver_data | Query | String(0-255characters) | driver data for replication | optional | - | - | - |
consistencygroup_id | Query | UUID | ID of a consistency group | optional | - | - | - |
Response¶
HTTP Response Header¶
Format¶
HTTP/1.1 <response code> <message> (ex. 200 OK)
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "X-Openstack-Request-Id", "Content-Length", "Date"
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/{tenant_id}/volumes
Request Header¶
Accept-Encoding: gzip, deflate, compress(optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Request Body¶
- none
Sample API Response¶
Response Header¶
HTTP/1.1 200 OK
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "X-Openstack-Request-Id", "Content-Length", "Date"
Response Body¶
{
"volumes": [
{
"id": "<volume_id>",
"links": [
{
"href": "<volume_URL>",
"rel": "self"
},
{
"href": "<bookmark_URL>",
"rel": "bookmark"
}
],
"name": "<display_name>",
},
<<repeat>>
]
}
Execution Example¶
HTTP Request¶
GET /v2/a0b3f85088bf43c1a26eb0e0f8b0b38d/volumes HTTP/1.1
User-Agent: python-cinderclient
Host: 10.0.75.111:8776
X-Auth-Token: 5574e97cb2114d8198492ceecff96485
Accept: application/json
HTTP Response¶
HTTP/1.1 200 OK
X-Compute-Request-Id: req-a48592b9-07ac-4c44-8bef-e36ba569e5db
Content-Type: application/json
Content-Length: 353
X-Openstack-Request-Id: req-a48592b9-07ac-4c44-8bef-e36ba569e5db
Date: Tue, 23 Dec 2014 12:37:48 GMT
{"volumes": [{"id": "110977c2-58fc-4005-a1b6-b60c570c1138", "links": [{"href": "http://10.0.75.111:8776/v2/a0b3f85088bf43c1a26eb0e0f8b0b38d/volumes/110977c2-58fc-4005-a1b6-b60c570c1138", "rel": "self"}, {"href": "http://10.0.75.111:8776/a0b3f85088bf43c1a26eb0e0f8b0b38d/volumes/110977c2-58fc-4005-a1b6-b60c570c1138", "rel": "bookmark"}], "name": null}]}
Error Execution Example¶
HTTP Request¶
GET /v2/cb8aa2a2c7244af5aab1fa7881ba7f4/volumes HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8776
X-Auth-Token: ff2e687208974dff83e05693ac8ac723
Content-type: application/json
Accept: application/json
HTTP Response¶
HTTP/1.1 400 Bad Request
Content-Length: 65
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-a6cea180-5a71-4e73-9ad3-8c7bd23a3bb5
X-Openstack-Request-Id: req-a6cea180-5a71-4e73-9ad3-8c7bd23a3bb5
Date: Thu, 15 Oct 2015 06:57:14 GMT
{"badRequest": {"message": "Malformed request url", "code": 400}}