# Querying an API Version (Native OpenStack API)

#### Function

This API is used to query a specified API version.

#### URI

GET /{api_version}

Table 1 lists the parameters.

Table 1 Parameter description
Parameter | Mandatory | Description
--- | --- | ---
api_version | Yes | Specifies the API version, for example v2.

#### Request Message

- Request parameters

  None

- Example request

      1

      GET https://{ECS Endpoint}/v2

#### Response Message

- Response parameters

  Parameter | Type | Description
  --- | --- | ---
  version | Object | Specifies a specified version.
  id | String | Specifies the version ID, for example, v1.
  links | Array of objects | Specifies the API URL.
  href | String | Specifies the reference address of the current API version.
  rel | String | Specifies the relationship between the current API version and the referenced address.
  version | String | If the APIs of this version support minor versions, set this parameter to the maximum minor version supported. If not, leave this parameter blank.

  status

  String

  Specifies the version status. Possible values are as follows:
  - CURRENT: indicates a primary version.
  - SUPPORTED: indicates an old version that is still supported.
  - DEPRECATED: indicates a deprecated version which may be deleted later.

  updated | String | Specifies the version release time, which must be the UTC time. For example, the release time of v1 is 2014-06-28T12:20:21Z.
  min_version | String | If the APIs of this version support minor versions, set this parameter to the supported minimum minor version. If not, leave this parameter blank.

- Example response

       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26

      {
          "version": {
              "min_version": "",
              "media-types": [
                  {
                      "type": "application/vnd.openstack.compute+json;version=2",
                      "base": "application/json"
                  }
              ],
              "links": [
                  {
                      "rel": "self",
                      "href": "https://ecs.service.domain.com:443/v2/"
                  },
                  {
                      "rel": "describedby",
                      "href": "http://docs.openstack.org/",
                      "type": "text/html"
                  }
              ],
              "id": "v2.0",
              "updated": "1999-02-20T11:33:21Z",
              "version": "",
              "status": "SUPPORTED"
          }
      }

#### Returned Values

Normal values

Returned Values | Description
--- | ---
200 | The request has been successfully processed.

For details about other returned values, see Status Codes.

#### Error Codes

See Error Codes.

Parent topic: API Version Query