List flavor extra specs¶
Overview¶
Lists the extra-specs or keys for the specified flavor.
Classification¶
- List
API Operation Object¶
- os-extra_specs
Synchronous / Asynchronous¶
- -
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/{tenant_id}/flavors/{flavor_id}/os-extra_specs
Response¶
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/{tenant_id}/flavors/{flavor_id}/os-extra_specs
Request Header¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Request Body¶
- none
Sample API Response¶
Response Header¶
HTTP/1.1 200 OK
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
Response Body¶
{
"extra_specs": {
"key1": "value1",
"key2": "value2"
}
}
Execution Example¶
HTTP Request¶
GET /v2/b17a6492bfa54441910e15f07c983384/flavors/1/os-extra_specs HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: 23624b4b115d45c8bef88037c1a6a7b2
Content-type: application/json
Accept: application/json
HTTP Response¶
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 19
X-Compute-Request-Id: req-0e216113-fe12-4248-917a-0cb49b7624d9
Date: Tue, 06 Oct 2015 09:12:51 GMT
{"extra_specs": {}}
Error Execution Example¶
HTTP Request¶
GET /v2/b17a6492bfa54441910e15f7c983384/flavors/1/os-extra_specs HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: 23624b4b115d45c8bef88037c1a6a7b2
Content-type: application/json
Accept: application/json
HTTP Response¶
HTTP/1.1 400 Bad Request
Content-Length: 187
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-49f4e845-1c05-44a2-9a34-9517202789c7
Date: Tue, 06 Oct 2015 09:15:28 GMT
{"badRequest": {"message": "Malformed request URL: URL's project_id 'b17a6492bfa54441910e15f7c983384' doesn't match Context's project_id 'b17a6492bfa54441910e15f07c983384'", "code": 400}}