• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. API Reference 2.0
  4. Kubernetes API
  5. APIGroups
  6. Listing APIVersions

Listing APIVersions

Function

This API is used to list APIversions.

URI

GET /api

Request

N/A.

Response

Response parameters:

Table 1 describes the response parameters.

Table 1 Parameter description

Parameter

Type

Description

kind

String

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated.

apiVersion

String

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

serverAddressByClientCIDRs

Table 2

a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.

versions

String array

versions are the api versions that are available.

Table 2 Data structure of the serverAddressByClientCIDRs field

Parameter

Type

Description

clientCIDR

String

The CIDR with which clients can match their IP to figure out the server address that they should use.

serverAddress

String

Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.

Example response:

{
    "kind": "APIVersions",
    "versions": [
        "v1"
    ],
    "serverAddressByClientCIDRs": [
        {
            "clientCIDR": "0.0.0.0/0",
            "serverAddress": "192.168.1.175:6443"
        }
    ]
}

Status Code

Table 3 describes the status code of this API.

Table 3 Status code

Status Code

Description

200

This operation succeeds, and a group of APIVersions resource objects is returned.

For the description about status codes, see Status Codes.