Querying a Specified API Version

Function

This API is used to query the version of an API.

URI

  • URI format

    GET /{version_id}

  • Parameter description

    Table 1 Parameter description

    Parameter

    Mandatory

    Type

    Description

    version_id

    Yes

    String

    Version ID

Requests

None

Responses

Table 2 Response parameters

Parameter

Mandatory

Type

Description

version

Yes

Array of objects

Version information. For details, see Table 3.

Table 3 version field data structure description

Parameter

Mandatory

Type

Description

id

Yes

String

Version number, for example, v1.0

links

Yes

Array of objects

JSON object. For details, see Table 4.

version

Yes

String

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

Yes

String

Version status. Valid values are as follows:

  • CURRENT: widely used version

  • SUPPORTED: earlier version which is still supported

  • DEPRECATED: deprecated version which may be deleted later

updated

Yes

String

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

min_version

No

String

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.

Table 4 links field data structure description

Parameter

Mandatory

Type

Description

href

Yes

String

API URL

rel

Yes

String

The default value is self.

Examples

The following uses the v1.0 version as an example.

  • Example request

    None

  • Example response

    {
       "version":
            {
                "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 5 lists the normal status code returned by the response.

Table 5 Status codes

Status Code

Status

Description

200

OK

Request processed successfully.

Exception status code. For details, see Status Codes.