Ensure the cluster repository webhook
import requests
url = "https://platform.ankra.app/org/clusters/{cluster_id}/webhook/ensure"
headers = {
"cookie": "ankra_session=",
"X-Ankra-CSRF": "<x-ankra-csrf>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'X-Ankra-CSRF': '<x-ankra-csrf>'}
};
fetch('https://platform.ankra.app/org/clusters/{cluster_id}/webhook/ensure', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/clusters/{cluster_id}/webhook/ensure \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session={
"message": "<string>",
"success": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Organisation
Ensure the cluster repository webhook
Browser session authentication; ensures the cluster’s connected GitOps repository carries the platform webhook, creating or repairing it (the repository-settings ‘ensure webhook’ action). Rate limited per cluster: a burst answers 429 with Retry-After. A cluster with no connected repository answers 404 with the reason in detail. Browser route only; there is no bearer-PAT twin yet (the route census’s twin-gap ratchet lists it).
POST
/
org
/
clusters
/
{cluster_id}
/
webhook
/
ensure
Ensure the cluster repository webhook
import requests
url = "https://platform.ankra.app/org/clusters/{cluster_id}/webhook/ensure"
headers = {
"cookie": "ankra_session=",
"X-Ankra-CSRF": "<x-ankra-csrf>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'X-Ankra-CSRF': '<x-ankra-csrf>'}
};
fetch('https://platform.ankra.app/org/clusters/{cluster_id}/webhook/ensure', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/clusters/{cluster_id}/webhook/ensure \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session={
"message": "<string>",
"success": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Headers
Must match the ankra_csrf browser cookie.