Querying an API Version

Function

This API is used to query an API version of NAT Gateway.

URI

GET/{api_version}

Table 1 Parameter description

Parameter

Mandatory

Description

api_version

Yes

Specifies the API version.

Request

None

Response

Table 2 lists response parameters.

Table 2 Response parameters

Parameter

Mandatory

Type

Description

version

Yes

String

Specifies the API version.

id

Yes

String

Specifies the version ID, for example, v1.

links

Yes

Array

Specifies the API URL.

href

Yes

String

Specifies the reference address of the current API version.

rel

Yes

String

Specifies the relationship between the current API version and the referenced address.

version

Yes

String

Specifies the version. If APIs of this version support minor versions, set this parameter to the supported maximum minor version. If the minor versions are not supported, leave this parameter blank.

status

Yes

String

Specifies the version status. Possible values are as follows:

  • CURRENT: indicates that the version is the primary version.

  • SUPPORTED: indicates that the version is an old version, but it is still supported.

  • DEPRECATED: indicates a deprecated version which may be deleted later.

updated

Yes

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

No

String

If APIs of this version support minor versions, set this parameter to the supported minimum minor version. If not, leave this parameter blank.

Examples

  • Example response

{
  "version": {
      "id": "v2.0",
      "links": [
        {
          "href": "https://x.x.x.x/v2.0/",
          "rel": "self"
        }
      ],
      "min_version": "",
      "status": "CURRENT",
      "updated": "2018-09-30T00:00:00Z",
      "version": ""
    }
}

Status Codes

See Status Codes.