Querying an API Version
Function
This API is used to query a specified API version of OMS.
Calling Method
For details, see Calling APIs.
URI
GET /{version}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
version |
Yes |
String |
The API version. Minimum length: 1 character Maximum length: 10 characters |
Request
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
The token used for IAM authentication. Minimum length: 1 character Maximum length: 16,384 characters |
Response
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
The API version, for example, v1. |
|
links |
Array of Link objects |
The link address. Array length: 0 to 100 |
|
status |
String |
The version status. CURRENT: The version is recommended. SUPPORTED: The version is supported. DEPRECATED: The version is deprecated and may be deleted later. Enumerated values: |
|
updated |
String |
The time when the version was 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 time. Minimum length: 0 characters Maximum length: 32 characters |
|
Parameter |
Type |
Description |
|---|---|---|
|
href |
String |
The link address. |
|
rel |
String |
The value is self, indicating that href is a local link. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
The error message. |
|
error_code |
String |
The error code. |
Example Request
This example queries a specified API version of OMS.
GET https://{endpoint}/v2
Example Response
Status code: 200
The API version.
{
"links" : [ {
"rel" : "self",
"href" : "https://oms.cn-north-1.myhuaweicloud.com/v1/"
} ],
"id" : "v2",
"updated" : "2020-04-01T12:00:00Z",
"status" : {
"type" : "string",
"example" : "SUPPORTED",
"description" : "Status type. The default value is SUPPORTED. \nCURRENT: The version is recommended. \nDEPRECATED: The version is deprecated and may be deleted later. \nSUPPORTED: The version is supported. This is the default value.",
"enum" : [ "CURRENT", "DEPRECATED", "SUPPORTED" ],
"default" : "SUPPORTED"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The API version. |
|
403 |
Forbidden |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.