REST Get Volumes
To review details of volumes - such as size, ACL, UUID, etc. - use the GET method with this URL: /api/v2/volumes
.
Sample Command
curl -s -X GET --insecure -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $LIGHTOS_JWT" https://localhost:443/api/v2/volumes | jq
Sample Output
x
{
"volumes": [
{
"state": "Available",
"protectionState": "FullyProtected",
"replicaCount": 3,
"nodeList": [
"5d8fef00-82b0-559f-a523-990ac14ddb09"
],
"UUID": "7836481b-bc2c-4a2b-bbb8-5fbb541b57f9",
"nsid": 1,
"acl": {
"values": [
"vol1"
]
},
"compression": "false",
"size": "2199023255552",
"name": "vol1",
"rebuildProgress": "None",
"statistics": {
"logicalUsedStorage": "0",
"physicalUsedStorage": "0",
"compressionRatio": 0
},
"IPAcl": {
"values": [
"ALLOW_ANY"
]
},
"ETag": "1",
"connectedHosts": [],
"sectorSize": 4096,
"projectName": "default"
}
]
}
You can also use this command to get the information for a specific volume by adding the volume UUID to the command. For example:
curl -s -X GET http://192.168.16.153:80/api/v2/volumes/6cc0b3ae-f5fe-426e-acff-a31afbc1f1b7
Was this page helpful?