Chuyển tới nội dung chính

Get Volume

GET /v3/{project_id}/volumes/{volume_id}

To retrieve details of a specific volume in your project, you can send a GET request to the /v3/{project_id}/volumes/{volume_id} endpoint of the volume service, replacing {project_id} with your project ID and {volume_id} with the ID of the volume you want to retrieve. This request requires an authentication token, which you should include in the request headers.

info

Source: get-volume

Request

Body Parameters

NameInTypeDescription
project_idpathstringThe UUID of the project in a multi-tenancy cloud.
volume_idpathstringThe UUID of the volume.

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/{VOLUME_ID}

Using HTTP request

GET https://api.vietnix.cloud:8776/v3/{PROJECT_ID}/volumes/{VOLUME_ID}

Response

Parameters

NameTypeDescription
volumeobjectA volume object.
migration_status (Optional)stringThe volume migration status. Admin only.
attachmentsarrayInstance attachment information when attached to a server; otherwise empty.
idstringThe UUID of the volume.
linksarrayThe volume links.
namestringThe volume name.
sizeintegerThe size of the volume, in gibibytes (GiB).
bootablestringEnables or disables the bootable attribute.
statusstringThe volume status.
created_atstringThe date and time when the resource was created (ISO 8601).
availability_zonestringThe name of the availability zone.
descriptionstringThe volume description.
multiattachbooleanIf true, this volume can attach to more than one instance.
source_volid (Optional)stringThe UUID of the source volume; new volume is at least this size.
volume_typestringThe associated volume type name.
service_uuidstringIdentifier of the node servicing the volume. New in version 3.48.
shared_targetsbooleanWhether the back end utilizes shared_targets. Default true. New in version 3.48.
os-vol-host-attr:host (Optional)stringCurrent back end. Format: host@backend#pool.
encryptedbooleanIf true, this volume is encrypted.
updated_atstringThe date and time when the resource was updated (ISO 8601) or null.
replication_statusstringThe volume replication status.
snapshot_id (Optional)stringUUID of the snapshot the volume was created from.
user_idstringThe UUID of the user.
os-vol-tenant-attr:tenant_idstringThe project ID the volume belongs to.
os-vol-mig-status-attr:migstat (Optional)stringThe status of this volume migration (None means not in progress).
os-vol-mig-status-attr:name_id (Optional)stringThe volume ID that this volume name on the back end is based on.
metadataobjectKey/value metadata associated with the volume.
volume_image_metadata (Optional)objectImage metadata entries; present for volumes from images or their snapshots.
consistencygroup_idstringThe UUID of the consistency group.

Status Code

Success

CodeReason
200 - OKRequest was successful.

Error

CodeReason
401 - UnauthorizedUser must authenticate before making a request.
403 - ForbiddenPolicy does not allow current user to do this operation.

Sample Response

{
"volume": {
"id": "30deaa51-7690-48e4-9a04-131e74db74c3",
"status": "in-use",
"size": 20,
"availability_zone": "nova",
"created_at": "2025-09-22T10:08:20.303259",
"updated_at": "2025-09-22T10:08:25.471813",
"name": "kub01-diqorkiwjmux-kube_minions-iulg6ecboyfz-0-exmhruv4vsey-kube_node_volume-gbieb2z4bdlf",
"description": null,
"volume_type": "nvmer3",
"snapshot_id": null,
"source_volid": null,
"metadata": {
"vzhardware": "2.0.1"
},
"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"
}
],
"user_id": "304e91ae6f114b46914834ae58469754",
"bootable": "true",
"encrypted": false,
"replication_status": null,
"consistencygroup_id": null,
"multiattach": false,
"attachments": [
{
"id": "30deaa51-7690-48e4-9a04-131e74db74c3",
"attachment_id": "1db813b3-5673-4eab-a86d-89972cfc8174",
"volume_id": "30deaa51-7690-48e4-9a04-131e74db74c3",
"server_id": "6cc8656c-f8aa-4c2d-9436-0da855bcd4d6",
"host_name": null,
"device": "/dev/vda",
"attached_at": "2025-09-22T10:08:25.414019"
}
],
"os-vol-tenant-attr:tenant_id": "f33507157a634f1cac71e06a70fb558e",
"volume_image_metadata": {
"os_distro": "fedora-coreos",
"version": "41.20250117.3.0-7.2.0_4.vl9",
"owner_specified.openstack.md5": "",
"owner_specified.openstack.sha256": "",
"owner_specified.openstack.object": "images/fedora-coreos-x64-k8saas-secondary",
"image_validated": "yes",
"image_id": "d275727a-a1c9-4d71-8180-adadc7fc266b",
"image_name": "fedora-coreos-x64-k8saas-secondary",
"checksum": "7db807921dcb73698f7c724bcdf111a7",
"container_format": "bare",
"disk_format": "qcow2",
"min_disk": "10",
"min_ram": "0",
"size": "3302162432"
}
}
}