• Key Management Service

kms
  1. Help Center
  2. Key Management Service
  3. API Reference
  4. APIs
  5. Querying All API Versions

Querying All API Versions

Function

This API is used to query the API versions.

URI

  • URI format

    GET /

  • Parameter description

    None

Requests

None

Responses

Response parameters

Parameter

Type

Mandatory

Description

versions

JSONArray

Yes

The list of all versions

id

String

Yes

Version number, for example, v1.0

links

JSON

Yes

JSON object

href

String

Yes

API URL.

rel

String

Yes

The default value is self.

version

String

Yes

If the APIs of this version support microversions, the supported maximum microversion is returned. If the microversion is not supported, empty character string is returned.

status

String

Yes

Version status. Valid values are as follows:

  • CURRENT: widely used version
  • SUPPORT: earlier version which is still supported
  • DEPRECATED: deprecated version which may be deleted later

updated

String

Yes

Version release time, which must be UTC time. For example, the release time of v1 is 2014-06-28T12:20:21Z.

min_version

String

No

If the APIs of this version support microversions, the supported minimum microversion is returned. If the microversion is not supported, empty character string is returned.

Examples

The following describes how to query the version information.

  • Example request

    None

  • Example response
    { 
       "versions":
        [
            {
                "id":"v1.0",
                "links":
                [
                    {
                        
                        "href":"https://kms.eu-de.otc.t-systems.com/v1.0/",
                        "rel":"self"
                    }
                ],
                "min_version":"",
                "status":"CURRENT",
                "version":"",
                "updated":"2018-09-05T08:18:05Z"
            }
        ]
    }

or

{
    "error": {
        "error_code": "KMS.XXXX",
        "error_msg": "XXX"
    }
}

Status Codes

Table 1 lists the normal status code returned by the response.
Table 1 Status codes

Status Code

Status

Description

200

OK

Request processed successfully.

Exception status code. For details, see Status Codes.