List Volumes
GET /v3/{project_id}/volumes
To list all volumes in your project, you can send a GET request to the /v3/{project_id}/volumes endpoint of the volume service. This request requires an authentication token, which you should include in the request headers.
info
Source: list-volumes
Request
Body Parameters
| Name | In | Type | Description |
|---|---|---|---|
| project_id | path | string | The UUID of the project in a multi-tenancy cloud. |
| created_at (Optional) | query | string | Filters results 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. 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 this example, the offset value is -05:00. New in version 3.60 |
| updated_at (Optional) | query | string | Filters results by a time that resources are updated 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. 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 this example, the offset value is -05:00. New in version 3.60 |
| 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 |
Sample Request
Using curl
curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:8776/v3/{PROJECT_ID}/volumes
http request
GET https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e/volumes
Response
Parameters
| Name | Type | Description |
|---|---|---|
| volumes | array | A list of volume objects. |
| id | string | The UUID of the volume. |
| links | array | The volume links. |
| name | string | The volume name. |
| volumes_links (Optional) | array | The volume links. |
| count (Optional) | integer | The total count of requested resource before pagination is applied. New in version 3.45 |
Status Code
Success
| Code | Reason |
|---|---|
| 200 - OK | Request was successful. |
Error
| Code | Reason |
|---|---|
| 400 - Bad Request | Some content in the request was invalid. |
Sample Response
{
"volumes": [
{
"id": "332ee999-4e21-4b1b-bf8d-b139a6950dc4",
"name": "kubtest01-qrvuvhw7sn5q-kube_masters-ljbufjnwka7m-0-bkrb7mqusj77-kube_node_volume-oaciuhwqxwdr",
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e/volumes/332ee999-4e21-4b1b-bf8d-b139a6950dc4"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8776/f33507157a634f1cac71e06a70fb558e/volumes/332ee999-4e21-4b1b-bf8d-b139a6950dc4"
}
]
},
{
"id": "30deaa51-7690-48e4-9a04-131e74db74c3",
"name": "kub01-diqorkiwjmux-kube_minions-iulg6ecboyfz-0-exmhruv4vsey-kube_node_volume-gbieb2z4bdlf",
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e/volumes/30deaa51-7690-48e4-9a04-131e74db74c3"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8776/f33507157a634f1cac71e06a70fb558e/volumes/30deaa51-7690-48e4-9a04-131e74db74c3"
}
]
},
{
"id": "9e5576f7-fb9a-43f1-b701-801c470ee7bd",
"name": "kub01-diqorkiwjmux-kube_minions-iulg6ecboyfz-0-exmhruv4vsey-docker_volume-esm5ngxm7lim",
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e/volumes/9e5576f7-fb9a-43f1-b701-801c470ee7bd"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8776/f33507157a634f1cac71e06a70fb558e/volumes/9e5576f7-fb9a-43f1-b701-801c470ee7bd"
}
]
},
{
"id": "7c0007f3-928c-4d65-8dea-336836e1d837",
"name": "kub01-diqorkiwjmux-kube_masters-6f45c55gpjy2-0-xv53lzqji4hn-docker_volume-ixvh73br5vog",
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e/volumes/7c0007f3-928c-4d65-8dea-336836e1d837"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8776/f33507157a634f1cac71e06a70fb558e/volumes/7c0007f3-928c-4d65-8dea-336836e1d837"
}
]
},
{
"id": "e9ed8887-28a9-4579-bacf-460624995547",
"name": "kub01-diqorkiwjmux-kube_masters-6f45c55gpjy2-0-xv53lzqji4hn-kube_node_volume-cz7kzzvspbtg",
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e/volumes/e9ed8887-28a9-4579-bacf-460624995547"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8776/f33507157a634f1cac71e06a70fb558e/volumes/e9ed8887-28a9-4579-bacf-460624995547"
}
]
},
{
"id": "272de0a1-a155-4bdf-ab76-7ab6da4411f2",
"name": "vz-guest-tools-lin",
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e/volumes/272de0a1-a155-4bdf-ab76-7ab6da4411f2"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8776/f33507157a634f1cac71e06a70fb558e/volumes/272de0a1-a155-4bdf-ab76-7ab6da4411f2"
}
]
}
]
}