Skip to main content

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.

Request​

Parameters​

flavor_idstringrequired

The UUID of the flavor.

Sample Request​

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

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 CodeDescription
200 - OKRequest was successful.

Error​

Status CodeDescription
401 - UnauthorizedUser must authenticate before making a request.
403 - ForbiddenPolicy does not allow current user to do this operation.
404 - Not FoundThe 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.