Declare cluster service placement policy
import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/cluster-policies/{cluster_id}"
payload = {
"expected_revision": 1,
"region": "<string>",
"data_boundary": "<string>",
"local_only": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_revision: 1,
region: '<string>',
data_boundary: '<string>',
local_only: true
})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/cluster-policies/{cluster_id}', 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/org/service-admission/cluster-policies/{cluster_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 1,
"region": "<string>",
"data_boundary": "<string>",
"local_only": true
}
'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"data_boundary": "<string>",
"local_only": true,
"revision": 2,
"source": "organisation_declared",
"updated_at": "2023-11-07T05:31:56Z"
}Services
Declare cluster service placement policy
Requires the applications rollout flag and live membership intersected with token scopes. Cluster policy reads require clusters.read and writes clusters.write. Consumer reads require applications.read and clusters.read; binding requires applications.deploy, clusters.operate and clusters.read. Locations are organisation declarations, not independently verified. No service deployment is executed. Updates require the current revision; zero creates only. Browser mutations require CSRF.
PUT
/
api
/
v1
/
org
/
service-admission
/
cluster-policies
/
{cluster_id}
Declare cluster service placement policy
import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/cluster-policies/{cluster_id}"
payload = {
"expected_revision": 1,
"region": "<string>",
"data_boundary": "<string>",
"local_only": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_revision: 1,
region: '<string>',
data_boundary: '<string>',
local_only: true
})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/cluster-policies/{cluster_id}', 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/org/service-admission/cluster-policies/{cluster_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 1,
"region": "<string>",
"data_boundary": "<string>",
"local_only": true
}
'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"data_boundary": "<string>",
"local_only": true,
"revision": 2,
"source": "organisation_declared",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Success
Required string length:
1 - 63Pattern:
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Required string length:
1 - 63Pattern:
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Required range:
x >= 1Available options:
organisation_declared