= v1.APIVersions
{product-author}
{product-version}
:data-uri:
:icons:
:toc: macro
:toc-title:
:toclevels: 2

toc::[]

== Description
[%hardbreaks]
APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.

== Object Schema
Expand or mouse-over a field for more information about it.

++++
<pre>
<div style="margin-left:13px;"><span title="(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. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources">apiVersion</span>:
</div><div style="margin-left:13px;"><span title="(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. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds">kind</span>:
</div><details><summary><span title="(array) 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.">serverAddressByClientCIDRs</span>:
</summary><div style="margin-left:13px;">- <span title="(string) The CIDR with which clients can match their IP to figure out the server address that they should use.">clientCIDR</span>:
</div><div style="margin-left:13px;">  <span title="(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.">serverAddress</span>:
</div></details><details><summary><span title="(array) versions are the api versions that are available.">versions</span>:
</summary><div style="margin-left:13px;">- <span title="(string)">[string]</span>:
</div></details>
</pre>
++++

== Operations

[[Get-api]]
=== Get all APIVersions
Get available API versions

==== HTTP request
----
GET /api/ HTTP/1.1
Authorization: Bearer $TOKEN
Accept: application/json
Connection: close
----

==== Curl request
----
$ curl -k \
    -H "Authorization: Bearer $TOKEN" \
    -H 'Accept: application/json' \
    https://$ENDPOINT/api/
----

==== Responses
[cols="1,5", options="header"]
|===
|HTTP Code|Schema
|200 OK|v1.APIVersions
|401 Unauthorized|
|===

==== Consumes

* application/json
* application/yaml
* application/vnd.kubernetes.protobuf

==== Produces

* application/json
* application/yaml
* application/vnd.kubernetes.protobuf


[[Get-oapi]]
=== Get all APIVersions
Get available API versions

==== HTTP request
----
GET /oapi/ HTTP/1.1
Authorization: Bearer $TOKEN
Accept: application/json
Connection: close
----

==== Curl request
----
$ curl -k \
    -H "Authorization: Bearer $TOKEN" \
    -H 'Accept: application/json' \
    https://$ENDPOINT/oapi/
----

==== Responses
[cols="1,5", options="header"]
|===
|HTTP Code|Schema
|200 OK|v1.APIVersions
|401 Unauthorized|
|===

==== Consumes

* application/json
* application/yaml
* application/vnd.kubernetes.protobuf

==== Produces

* application/json
* application/yaml
* application/vnd.kubernetes.protobuf



