Updated on 2024-04-18 GMT+08:00

Querying a Specified API Version

Description

Query a specified API version.

Constraints

None

API Calling

For details, see Calling APIs.

URI

GET /{api_version}

Table 1 Path parameter

Parameter

Mandatory

Type

Description

api_version

Yes

String

API version.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). The value can be application/json;charset=utf-8 application/json

The default value is application/json.

X-Auth-Token

Yes

String

User token.

The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

version

VersionDetail object

List of specified versions.

Table 4 VersionDetail

Parameter

Type

Description

id

String

Version ID.

links

Link object

API URL.

version

String

If microversions are supported, set this parameter to the maximum microversion supported. Otherwise, leave this parameter empty.

status

String

Version status:

CURRENT: The version is the primary version.

SUPPORTED: The version is an earlier version, but it is still supported.

DEPRECATED: The version is a deprecated version, which may be deleted later.

updated

String

The version release time in UTC. For example, the release time of v1 is 2014-06-28T12:20:21Z.

min_version

String

If microversions are supported, set this parameter to the minimum microversion supported. Otherwise, leave this parameter empty.

Example Request

GET https://{endpoint}/{api_version}

Example Response

Status code: 200

Query succeeded.

{
  "version" : {
    "id" : "v2",
    "links" : {
      "href" : "https://swr-api.xxxx.myhuaweicloud.com/v2/",
      "rel" : "self"
    },
    "min_version" : "2.0",
    "status" : "CURRENT",
    "updated" : "2017-12-09T00:00:00Z",
    "version" : "2.26"
  }
}

Status Codes

Status Code

Description

200

Query succeeded.

500

Internal error.

Error Codes

For details, see Error Codes.