Querying a Specified API Version

Function

This API is used to query a specified API version of OMS.

Debugging

You can debug this API in API Explorer.

URI

GET /{version}

Table 1 Path parameter

Parameter

Mandatory

Type

Description

version

Yes

String

Specifies the API version.

Minimum length: 1 character

Maximum length: 10 characters

Request

None

Response

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

id

String

Specifies the API version, for example, v1.

links

Array of Link objects

Specifies the link address.

status

String

Specifies the version status.

CURRENT: indicates a widely used version.

SUPPORTED: indicates an earlier version which is still supported.

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

Value options are as follows:

  • CURRENT
  • DEPRECATED
  • SUPPORTED

updated

String

Specifies the time when the version is updated.

The format is yyyy-mm-ddThh:mm:ssZ.

T is the separator between the calendar and the hourly notation of time. Z indicates the UTC.

Minimum length: 0 characters

Maximum length: 32 characters

Status code: 403

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Specifies the error message.

error_code

String

Specifies the error code.

Example Request

Obtain version information.

GET https://{endpoint}/v2

{
  "version" : {
    "links" : [ {
      "rel" : "self",
      "href" : "https://oms.cn-north-1.myhuaweicloud.com/v1/"
    } ],
    "id" : "v2",
    "updated" : "2020-04-01T12:00:00Z",
    "status" : "SUPPORTED"
  }
}

Example Response

Status code: 200

Version information

{
  "links" : [ {
    "rel" : "self",
    "href" : "https://oms.cn-north-1.myhuaweicloud.com/v1/"
  } ],
  "id" : "v2",
  "updated" : "2020-04-01T12:00:00Z",
  "status" : "SUPPORTED"
}

Status Codes

Status Code

Description

200

Version information

403

Forbidden

Error Codes

See Error Codes.