import requests
url = "https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/gateway-api"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/gateway-api', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/gateway-api \
--header 'Authorization: Bearer <token>'{
"available": true,
"unavailable_reason": "<string>",
"enabled": true,
"phase": "<string>",
"crds": {
"source": "<string>",
"state": "<string>",
"observed": [
"<string>"
],
"missing": [
"<string>"
],
"addon_state": "<string>",
"addon_applied": "<string>",
"established": true,
"detail": "<string>"
},
"traefik": {
"addon": "<string>",
"managed": true,
"values": "<string>",
"conflicts": [
{
"addon": "<string>",
"key": "<string>",
"outcome": "<string>",
"detail": "<string>"
}
],
"applied": "<string>",
"last_applied_at": "<string>"
},
"cert_manager": {
"addon": "<string>",
"managed": true,
"values": "<string>",
"conflicts": [
{
"addon": "<string>",
"key": "<string>",
"outcome": "<string>",
"detail": "<string>"
}
],
"applied": "<string>",
"last_applied_at": "<string>"
},
"values_hold": "<string>",
"resource_ids": [
"<string>"
],
"applies": "<string>",
"note": "<string>",
"changed": true,
"recorded": true,
"values_written": true,
"commit_sha": "<string>",
"operation_id": "<string>",
"git_push_failure": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Enable the Gateway API
Turn the Kubernetes Gateway API on for this cluster. Idempotent and enable-only; the request carries no body. It records the option on the cluster’s cloud-provider definition when it is not recorded yet - the platform’s networking render then adds the gateway-api-crds addon within a few minutes, or uses a Gateway API CRD bundle the cluster already carries rather than installing over it - and, once the platform reads the CRDs as established, writes the Gateway API keys into the Traefik and cert-manager values through the ordinary stack write (one GitOps commit on a GitOps-backed cluster), keeping every other value the owner wrote. The values are never written while the CRDs are not up, so call it again until phase is enabled; a key the owner set the other way refuses the values write and is named under conflicts, so nothing of theirs is overwritten. Every Ingress keeps working; a Gateway is added beside them. The answer is the status after this call’s writes plus what it changed (changed, recorded, values_written, commit_sha, operation_id). Invalid states answer 409 with a detail message: a cluster of another provider, one without an Ankra-managed cloud controller or networking stack, a cloud-provider resource still being created or removed, a cluster carrying only part of the Gateway API CRD bundle, one whose CRDs the platform cannot read yet, an offline cluster, and one whose GitOps sync is paused on open conflicts.
import requests
url = "https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/gateway-api"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/gateway-api', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/gateway-api \
--header 'Authorization: Bearer <token>'{
"available": true,
"unavailable_reason": "<string>",
"enabled": true,
"phase": "<string>",
"crds": {
"source": "<string>",
"state": "<string>",
"observed": [
"<string>"
],
"missing": [
"<string>"
],
"addon_state": "<string>",
"addon_applied": "<string>",
"established": true,
"detail": "<string>"
},
"traefik": {
"addon": "<string>",
"managed": true,
"values": "<string>",
"conflicts": [
{
"addon": "<string>",
"key": "<string>",
"outcome": "<string>",
"detail": "<string>"
}
],
"applied": "<string>",
"last_applied_at": "<string>"
},
"cert_manager": {
"addon": "<string>",
"managed": true,
"values": "<string>",
"conflicts": [
{
"addon": "<string>",
"key": "<string>",
"outcome": "<string>",
"detail": "<string>"
}
],
"applied": "<string>",
"last_applied_at": "<string>"
},
"values_hold": "<string>",
"resource_ids": [
"<string>"
],
"applies": "<string>",
"note": "<string>",
"changed": true,
"recorded": true,
"values_written": true,
"commit_sha": "<string>",
"operation_id": "<string>",
"git_push_failure": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
As GatewayAPIStatus.
As GatewayAPIStatus.
As GatewayAPIStatus.
As GatewayAPIStatus, after this call's writes.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
As GatewayAPIStatus.
As GatewayAPIStatus.
As GatewayAPIStatus.
As GatewayAPIStatus.
True when this call wrote anything: the record, the values, or both.
True when this call turned the option on in the cloud-provider definition.
True when this call wrote the Gateway API keys into the Traefik and cert-manager values.
The GitOps commit the values write made, when the cluster is GitOps-backed and the push succeeded.
The operation the values write started, when it started one.
Set when the values reached the database but the GitOps push failed or was deferred; the stack write's own wording.