Querying All API Versions

Function

This API is used to query all API versions of NAT Gateway.

API Format

GET/

Request

None

Response

Table 1 lists response parameters.

Table 1 Response parameters

Parameter

Mandatory

Type

Description

versions

Yes

Array

Specifies the list of all versions.

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.

The value can be:

  • 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 time when the API version was released.

The value must be 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

{
  "versions": [
    {
      "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.