Querying a Specified API Version¶
Function Description¶
This API is used to query the information of a specified version.
To support function extension, Nova APIs can be distinguished by version. There are two types of versions:
Major version: Independent URL
Microversion: Used by the HTTP request header X-OpenStack-Nova-API-Version. Since version 2.27, the new microversion header OpenStack-API-Version has been supported.
Note
If the OpenStack-API-Version request header is used, the version is in the format of "compute microversion".
For example, if key is set to OpenStack-API-Version, set value to compute 2.27.
URI¶
GET /{api_version}
Table 1 describes the parameters in the URI.
Parameter | Mandatory | Description |
---|---|---|
api_version | Yes | Specifies an API version, such as V2. |
Request¶
None
Response¶
The following table describes the response parameters.
Parameter | Type | Description |
---|---|---|
id | string | Specifies the version ID. |
links | Object | Specifies the links to resources. For more information, see the OpenStack Documentation. For details, see Table 4. |
media-types | Object | Specifies the media types. For details, see Table 5. |
min_version | string |
|
status | string | Specifies the API version status. Possible values are as follows:
|
updated | string | The value of this parameter varies by API version. If the API version is 2.0, the value is 2011-01-21T11:33:21Z. If the API version is 2.1, the value is 2013-07-23T11:33:21Z. |
version | string |
|
Parameter | Type | Description |
---|---|---|
href | string | Specifies the links of the corresponding resources. |
rel | string |
|
Parameter | Type | Description |
---|---|---|
base | string | Specifies the basic type. |
type | string | Specifies the media type. |
Example Request¶
Query information about a specified API version.
GET https://{endpoint}/v2.1
Example Response¶
{
"version":{
"min_version":"2.1",
"media-types":[
{
"type":"application/vnd.openstack.compute+json;version=2.1",
"base":"application/json"
}
],
"links":[
{
"rel":"self",
"href":"https://{endpoint}/v2.1/"
},
{
"rel":"describedby",
"href":"http://docs.openstack.org/",
"type":"text/html"
}
],
"id":"v2.1",
"updated":"2013-07-23T11:33:21Z",
"version":"2.60",
"status":"CURRENT"
}
}