Querying All API Versions

Function

This API is used to query all API versions of the Object Storage Migration Service (OMS).

Debugging

You can debug this API in API Explorer.

URI

GET /

Request

None

Response

Status code: 200

Table 1 Response body parameter

Parameter

Type

Description

versions

Array of Version objects

Specifies the API version list.

Table 2 Version field description

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 Coordinated Universal Time (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

Query the list of supported API versions.

GET https://{endpoint}/

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

Example Response

Status code: 200

OK

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

Status Codes

Status Code

Description

200

OK

403

Forbidden

Error Codes

See Error Codes.