Querying a Specified API Version

Function

This API is used to query a specified API version of Cloud Trace Service (CTS).

URI

GET /{api_version}

For details about the parameters, see Table 1.
Table 1 Parameters in the URI

Parameter

Mandatory

Description

api_version

Yes

API version

Request

None.

Response

  • Parameter description
    Table 2 Parameters in the request

    Parameter

    Mandatory

    Type

    Description

    version

    Yes

    Array

    List of all API versions.

    id

    Yes

    String

    Version ID (version number), for example, v1.

    links

    Yes

    String

    API URL.

    href

    Yes

    String

    Reference address of the current API version.

    rel

    Yes

    String

    Relationship between the current API version and the referenced address.

    version

    Yes

    String

    If APIs of this version support microversions, set this parameter to the supported maximum microversion. If the microversion is not supported, leave this parameter empty.

    status

    Yes

    String

    Version status. The options are as follows:

    CURRENT: The version is the primary version.

    SUPPORTED: The version is an old version, but it is still supported.

    DEPRECATED: The version is a deprecated version, which may be deleted later.

    updated

    Yes

    String

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

    min_version

    No

    String

    If APIs of this version support microversions, set this parameter to the supported minimum microversion. If the microversion is not supported, leave this parameter empty.

  • Example response
    {
      "version": 
        {
          "id": "v1.0",
          "links": [
            {
              "href": "https://x.x.x.x/v1.0/",
              "rel": "self"
            }
          ],
          "min_version": "",
          "status": "CURRENT",
          "updated": "2018-09-30T00:00:00Z",
          "version": ""
        }
    }

Returned Value

  • Normal

    200

  • Abnormal
    Table 3 Return code for failed requests

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    The authentication information is unavailable or incorrect.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The server failed to find the requested resource.

    408 Request Timeout

    The request timed out.

    429 Too Many Requests

    The number requests exceeded the upper limit.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    503 Service Unavailable

    Failed to complete the request because the system is unavailable.