2.4.1. List Flavors

Verb URI Description
GET /flavors?minDisk=minDiskInGB& minRam=minRamInMB& marker=markerID&limit=int Lists IDs, names, and links for all available flavors.
GET /flavors/detail?minDisk=minDiskInGB& minRam=minRamInMB& marker=markerID&limit=int Lists all details for all available flavors.

Normal Response Code(s): 200, 203

Error Response Code(s): computeFault (400, 500, …), serviceUnavailable (503), unauthorized (401), forbidden (403), badRequest (400), badMethod (405), overLimit (413)

This operation lists information for all available flavors.

To filter the list of flavors returned in the response body, you can specify the following optional parameters in the URI:

minDisk=minDiskInGB&

Filters the list of flavors to those with the specified minimum number of gigabytes of disk storage.

minRam=minRamInMB&

Filters the list of flavors to those with the specified minimum amount of RAM in megabytes.

marker=markerID&

The ID of the last item in the previous list. See Section 1.5, “Paginated Collections”.

limit=int

Sets the page size. See Section 1.5, “Paginated Collections”.

This operation does not require a request body.

 

Example 2.41. 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="52415800-8b69-11e0-9b19-734f1195ff37"
          name="256 MB Server" ram="256" disk="10" vcpus="1">
      <atom:link
          rel="self"
          href="http://servers.api.openstack.org/v2/1234/flavors/52415800-8b69-11e0-9b19-734f1195ff37"/>
      <atom:link
          rel="bookmark"
          href="http://servers.api.openstack.org/1234/flavors/52415800-8b69-11e0-9b19-734f1195ff37"/>
  </flavor>
  <flavor id="52415800-8b69-11e0-9b19-734f216543fd"
          name="512 MB Server" ram="512" disk="20" vcpus="2">
      <atom:link
          rel="self"
          href="http://servers.api.openstack.org/v2/1234/flavors/52415800-8b69-11e0-9b19-734f216543fd"/>
      <atom:link
          rel="bookmark"
          href="http://servers.api.openstack.org/1234/flavors/52415800-8b69-11e0-9b19-734f216543fd"/>
  </flavor>
</flavors>

 

Example 2.42. Flavors List Response: JSON (detail)

{
    "flavors": [
        {
            "id": "52415800-8b69-11e0-9b19-734f1195ff37",
            "name": "256 MB Server",
            "ram": 256,
            "disk": 10,
            "vcpus": 1,
            "links": [
                {
                    "rel": "self",
                    "href": "http://servers.api.openstack.org/v2/1234/flavors/52415800-8b69-11e0-9b19-734f1195ff37"
                },
                {
                    "rel": "bookmark",
                    "href": "http://servers.api.openstack.org/1234/flavors/52415800-8b69-11e0-9b19-734f1195ff37"
                }
            ]
        },
        {
            "id": "52415800-8b69-11e0-9b19-734f216543fd",
            "name": "512 MB Server",
            "ram": 512,
            "disk": 20,
            "vcpus": 2,
            "links": [
                {
                    "rel": "self",
                    "href": "http://servers.api.openstack.org/v2/1234/flavors/52415800-8b69-11e0-9b19-734f216543fd"
                },
                {
                    "rel": "bookmark",
                    "href": "http://servers.api.openstack.org/1234/flavors/52415800-8b69-11e0-9b19-734f216543fd"
                }
            ]
        }
    ]
}



loading table of contents...