Updated on 2024-03-13 GMT+08:00

Querying All SMN API Versions

Function

This API is used to list all SMN API versions.

Calling Method

For details, see Calling APIs.

URI

GET /

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies a user token.

It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

versions

Array of VersionItem objects

Specifies the list of all versions.

Table 3 VersionItem

Parameter

Type

Description

id

String

Specifies the version ID, for example, v2.

min_version

String

Specifies the microversion. If the API supports microversions, the system returns the supported minimum microversion. If no, the system returns an empty value.

status

String

Specifies the 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

Specifies the version release time, which must be a UTC time. For example, the release time of v2 is 2014-06-28T12:20:21Z.

version

String

Specifies the microversion. If the API supports microversions, the system returns the supported minimum microversion. If no, the system returns an empty value.

links

Array of LinksItem objects

Specifies the API URL.

Table 4 LinksItem

Parameter

Type

Description

href

String

Specifies the corresponding shortcut link.

rel

String

Specifies the shortcut link marker name.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

request_id

String

Specifies the request ID, which is unique.

code

String

Specifies the error code.

message

String

Describes the error message.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

request_id

String

Specifies the request ID, which is unique.

code

String

Specifies the error code.

message

String

Describes the error message.

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

request_id

String

Specifies the request ID, which is unique.

code

String

Specifies the error code.

message

String

Describes the error message.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

request_id

String

Specifies the request ID, which is unique.

code

String

Specifies the error code.

message

String

Describes the error message.

Example Requests

GET https://{SMN_Endpoint}/

null

Example Responses

Status code: 200

OK

{
  "versions" : {
    "id" : "v2",
    "links" : [ {
      "href" : "https://127.0.0.1/v2",
      "rel" : "self"
    } ],
    "min_version" : "",
    "status" : "CURRENT",
    "updated" : "2018-09-19T00:00:00Z",
    "version" : ""
  }
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

403

Unauthorized

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.