Get Flavor Details
GET
/v2.1/flavors/{flavor_id}Returns the capacity of one flavor: vCPUs, RAM, root disk, and swap. Use it to confirm the exact size of a flavorRef before creating or resizing a VM, instead of relying on the flavor name.
info
Source: show-flavor-details
Request
Parameters
flavor_idstringrequiredThe UUID of the flavor.
Sample Request
- cURL
- HTTP
curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:8774/v2.1/flavors/468c0c15-08bd-4e1d-8564-5053ce12966b
GET https://api.vietnix.cloud:8774/v2.1/flavors/468c0c15-08bd-4e1d-8564-5053ce12966b
Response
Sample Response
Response body
{
"flavor": {
"id": "468c0c15-08bd-4e1d-8564-5053ce12966b",
"name": "2x4",
"vcpus": 2,
"ram": 4096,
"disk": 20,
"swap": 0,
"rxtx_factor": 1.0,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8774/v2.1/flavors/468c0c15-08bd-4e1d-8564-5053ce12966b"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8774/flavors/468c0c15-08bd-4e1d-8564-5053ce12966b"
}
]
}
}
Status Code
Success
| Status Code | Description |
|---|---|
| 200 - OK | Request was successful. |
Error
| Status Code | Description |
|---|---|
| 401 - Unauthorized | User must authenticate before making a request. |
| 403 - Forbidden | Policy does not allow current user to do this operation. |
| 404 - Not Found | The requested flavor could not be found, or is not visible to your project. |
note
A private flavor that belongs to another project returns 404 rather than 403, so the API does not reveal that it exists.