List availability zones¶
Overview¶
Lists all availability zones.
Classification¶
- List
API Operation Object¶
- os-availability-zone
Synchronous / Asynchronous¶
- -
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/{tenant_id}/os-availability-zone
Response¶
HTTP Response Header¶
Format¶
HTTP/1.1 <response_code> <message> (ex. 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"
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/{tenant_id}/os-availability-zone
Request Header¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Content-Type: application/json
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¶
{
"availabilityZoneInfo": [
{
"hosts": null,
"zoneName": "nova",
"zoneState": {
"available": true
}
}
]
}
Execution Example¶
HTTP Request¶
GET /v2/ad355aa6ed3e4cf5ae0fa0df652bc291/os-availability-zone HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: 9d98bc82b5fb43dbaa7792177ad43c6f
Content-type: application/json
Accept: application/json
HTTP Response¶
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 97
X-Compute-Request-Id: req-d724cf3a-b34e-4188-a6f1-aaa8b5c83ceb
Date: Thu, 15 Oct 2015 03:23:27 GMT
{"availabilityZoneInfo": [{"zoneState": {"available": true}, "hosts": null, "zoneName": "nova"}]}
Error Execution Example¶
HTTP Request¶
GET /v2/ad355aa6ed3e4cf5ae0fa0df652bc290/os-availability-zone HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: 9d98bc82b5fb43dbaa7792177ad43c6f
Content-type: application/json
Accept: application/json
HTTP Response¶
HTTP/1.1 400 Bad Request
Content-Length: 188
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-2ba677a5-caf6-467c-b55e-daa20354e773
Date: Thu, 15 Oct 2015 03:24:01 GMT
{"badRequest": {"message": "Malformed request URL: URL's project_id 'ad355aa6ed3e4cf5ae0fa0df652bc290' doesn't match Context's project_id 'ad355aa6ed3e4cf5ae0fa0df652bc291'", "code": 400}}