List Flavors

Overview

Lists all Flavor. That hash only id, links and name. If you want to get detail flavor information, call List Flavors Detail API. A flavor is a hardware configuration for a server. Each flavor is a unique combination of disk space and memory capacity.

Classification

  • List

API Operation Object

Synchronous / Asynchronous

  • Synchronous

Request

HTTP Request Method

  • GET

HTTP Request Path

{api_endpoint}/v2/{tenant_id}/flavors

HTTP Request Header

Accept: application/json
Content-Type: application/json
X-Auth-Token: <token>

HTTP Request Body

  • none

Request Parameter

Input Parameters
name style format description required/optional default value action for invalid parameter response code for invalid parameter
tenant_id URL UUID ID for the tenant. required - Terminate 403, 404
token Header Authentication token string Keystone authentication token. required - Terminate 401

Response

HTTP Response Header

Format

HTTP/1.1 200 OK
  • <response_code>: see “HTTP Responses” section
  • <message>: message based on the response code

Response Code

Response Codes
response code condition
200 normal end
400 specified parameter is invalid
401 unauthorized
403 tenant is not available
404 not found a item
405 request URL or method is invalid
415 bad media type
500 compute fault. If an error other than above has occurred, the response code is always 500.

HTTP Response Body

Format

{
  "flavors": [
    {
      "id": "<id>",
      "links": [
        {
          "href": "<href>",
          "rel": "<rel>"
        },
        {
          "href": "<href>",
          "rel": "<rel>"
        }
      ],
      "name": "<name>"
    },

    ...
  ]
}

Response Parameter

Response Parameters
item format   description
Flavors Flavor Array   List all Flavor associated with tenant_id. That has only id, links and name.

Sample Request and Response

Sample API Request

Request URI

https://baremetal-server-jp1-ecl.api.ntt.com/v2/b322a85578de48beba0f92acce57869b/flavors

Request Header

GET /v2/b322a85578de48beba0f92acce57869b/flavors HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.150.51:8774
Accept: application/json
Content-Type: application/json
X-Auth-Token: 62d528dc0cca4827b0ed465efe1c2588

Request Body

  • none

Sample API Response

Response Header

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: <content-length>
Date: Thu, 17 Jul 2014 04:21:06 GMT

Response Body

{
  "flavors": [
    {
      "id": "05184ba3-00ba-4fbc-b7a2-03b62b884931",
      "links": [
        {
          "href": "https://baremetal-server-jp1-ecl.api.ntt.com/v2/5a077efd3e8e4319be283b22c0ce8c77/flavors/05184ba3-00ba-4fbc-b7a2-03b62b884931",
          "rel": "self"
        },
        {
          "href": "https://baremetal-server-jp1-ecl.api.ntt.com/5a077efd3e8e4319be283b22c0ce8c77/flavors/05184ba3-00ba-4fbc-b7a2-03b62b884931",
          "rel": "bookmark"
        }
      ],
      "name": "General Purpose 1"
    },
    {
      "id": "70a599e031e749b7b260868f441e862b",
      "links": [
        {
          "href": "https://baremetal-server-jp1-ecl.api.ntt.com/v2/5a077efd3e8e4319be283b22c0ce8c77/flavors/70a599e0-31e7-49b7-b260-868f441e862b",
          "rel": "yourself"
        },
        {
          "href": "https://baremetal-server-jp1-ecl.api.ntt.com/v2/5a077efd3e8e4319be283b22c0ce8c77/flavors/70a599e0-31e7-49b7-b260-868f441e862b",
          "rel": "sample"
        }
      ],
      "name": "General Purpose 2"
    }
  ]
}