A flavor is an available hardware configuration for a server. Each flavor has a unique combination of disk space and memory capacity.
| Verb | URI | Description | |||
| GET | /flavors | List available flavors (IDs, names, self links) | |||
| GET | /flavors/detail | List available flavors (all details) | |||
Normal Response Code(s): 200, 203
Error ResponseCode(s): computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), overLimit (413)
This operation will list all available flavors with details.
This operation does not require a request body.
Example 4.27. Flavors List Response: XML (detail)
<?xml version="1.0" encoding="UTF-8"?>
<flavors xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom">
<flavor id="1" name="256 MB Server" ram="256" disk="10">
<atom:link
rel="self"
href="http://servers.api.openstack.org/v1.1/1234/flavors/1"/>
<atom:link
rel="bookmark"
type="application/vnd.openstack.compute-v1.1+xml"
href="http://servers.api.openstack.org/1234/flavors/1"/>
<atom:link
rel="bookmark"
type="application/vnd.openstack.compute-v1.1+json"
href="http://servers.api.openstack.org/1234/flavors/1"/>
</flavor>
<flavor id="2" name="512 MB Server" ram="512" disk="20">
<atom:link
rel="self"
href="http://servers.api.openstack.org/v1.1/1234/flavors/2"/>
<atom:link
rel="bookmark"
type="application/vnd.openstack.compute-v1.1+xml"
href="http://servers.api.openstack.org/1234/flavors/2"/>
<atom:link
rel="bookmark"
type="application/vnd.openstack.compute-v1.1+json"
href="http://servers.api.openstack.org/1234/flavors/2"/>
</flavor>
</flavors>
Example 4.28. Flavors List Response: JSON (detail)
{
"flavors" : {
"values" : [
{
"id" : 1,
"name" : "256 MB Server",
"ram" : 256,
"disk" : 10,
"links": [
{
"rel" : "self",
"href" : "http://servers.api.openstack.org/v1.1/1234/flavors/1"
},
{
"rel" : "bookmark",
"type" : "application/vnd.openstack.compute-v1.1+xml",
"href" : "http://servers.api.openstack.org/1234/flavors/1"
},
{
"rel" : "bookmark",
"type" : "application/vnd.openstack.compute-v1.1+json",
"href" : "http://servers.api.openstack.org/1234/flavors/1"
}
]
},
{
"id" : 2,
"name" : "512 MB Server",
"ram" : 512,
"disk" : 20,
"links": [
{
"rel" : "self",
"href" : "http://servers.api.openstack.org/v1.1/1234/flavors/2"
},
{
"rel" : "bookmark",
"type" : "application/vnd.openstack.compute-v1.1+xml",
"href" : "http://servers.api.openstack.org/1234/flavors/2"
},
{
"rel" : "bookmark",
"type" : "application/vnd.openstack.compute-v1.1+json",
"href" : "http://servers.api.openstack.org/1234/flavors/2"
}
]
}
]
}
}
| Verb | URI | Description | |||
| GET | /flavors/id |
List details of the specified flavor | |||
Normal Response Code(s): 200, 203
Error ResponseCode(s): computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), itemNotFound (404), overLimit (413)
This operation returns details of the specified flavor.
This operation does not require a request body.
Example 4.29. Flavor Details Response: XML
<?xml version="1.0" encoding="UTF-8"?>
<flavor
xmlns="http://docs.openstack.org/compute/api/v1.1"
xmlns:atom="http://www.w3.org/2005/Atom"
id="1" name="256 MB Server" ram="256" disk="10">
<atom:link
rel="self"
href="http://servers.api.openstack.org/v1.1/1234/flavors/1"/>
<atom:link
rel="bookmark"
type="application/vnd.openstack.compute-v1.1+xml"
href="http://servers.api.openstack.org/1234/flavors/1"/>
<atom:link
rel="bookmark"
type="application/vnd.openstack.compute-v1.1+json"
href="http://servers.api.openstack.org/1234/flavors/1"/>
</flavor>
Example 4.30. Flavor Details Response: JSON
{
"flavor" : {
"id" : 1,
"name" : "256 MB Server",
"ram" : 256,
"disk" : 10,
"links": [
{
"rel" : "self",
"href" : "http://servers.api.openstack.org/v1.1/1234/flavors/1"
},
{
"rel" : "bookmark",
"type" : "application/vnd.openstack.compute-v1.1+xml",
"href" : "http://servers.api.openstack.org/1234/flavors/1"
},
{
"rel" : "bookmark",
"type" : "application/vnd.openstack.compute-v1.1+json",
"href" : "http://servers.api.openstack.org/1234/flavors/1"
}
]
}
}
