import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/consumers"
payload = {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"allow_planned": True,
"local_only": True,
"expected_revision": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
namespace: '<string>',
allow_planned: true,
local_only: true,
expected_revision: 1
})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/consumers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/service-admission/consumers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"allow_planned": true,
"local_only": true,
"expected_revision": 1
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"region": "<string>",
"data_boundary": "<string>",
"policy_revision": 2,
"binding_revision": 2,
"binding_kind": "planned",
"installation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"local_only": true
}Bind an explicit application namespace
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.
import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/consumers"
payload = {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"allow_planned": True,
"local_only": True,
"expected_revision": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
namespace: '<string>',
allow_planned: true,
local_only: true,
expected_revision: 1
})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/consumers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/service-admission/consumers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"allow_planned": true,
"local_only": true,
"expected_revision": 1
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"region": "<string>",
"data_boundary": "<string>",
"policy_revision": 2,
"binding_revision": 2,
"binding_kind": "planned",
"installation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"local_only": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Response
Success
Physical cloud region of the placement, for example eu-north-1. It locates infrastructure; it is not the data-location promise, which is data_boundary.
1 - 63^[a-z][a-z0-9]*(-[a-z0-9]+)*$Boundary the data is permitted to stay within, for example eu. Sharing a service across clusters is decided by this boundary, never by the physical region.
1 - 63^[a-z][a-z0-9]*(-[a-z0-9]+)*$x >= 1x >= 1planned, installation The application installation the binding resolves to; null for a planned binding (binding_kind planned), which has no deployment yet. An installation identity does not imply readiness.