import requests
url = "https://platform.ankra.app/org/service-admission/eligibility"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://platform.ankra.app/org/service-admission/eligibility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/service-admission/eligibility \
--cookie ankra_session={
"environment": {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"consumer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"items": [
{
"package": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publisher_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"version": "<string>",
"capability": "<string>",
"digest": "<string>",
"first_party": true,
"created_at": "2023-11-07T05:31:56Z"
},
"reason": {
"code": "hosted_unavailable",
"message": "<string>",
"fix": "<string>"
},
"modes": [
{
"mode": "hosted",
"state": "available",
"reason": {
"code": "hosted_unavailable",
"message": "<string>",
"fix": "<string>"
},
"capacity": {
"state": "fits",
"reason": "<string>",
"plan_id": "<string>",
"quota": {
"limits_cpu_millicores": 123,
"limits_memory_mib": 123,
"requests_cpu_millicores": 123,
"requests_memory_mib": 123
},
"committed": {
"limits_cpu_millicores": 123,
"limits_memory_mib": 123,
"requests_cpu_millicores": 123,
"requests_memory_mib": 123
},
"transient": {
"limits_cpu_millicores": 123,
"limits_memory_mib": 123,
"requests_cpu_millicores": 123,
"requests_memory_mib": 123
},
"required": {
"limits_cpu_millicores": 123,
"limits_memory_mib": 123,
"requests_cpu_millicores": 123,
"requests_memory_mib": 123
}
},
"secret_inputs": [
"<string>"
]
}
]
}
],
"next_cursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Preview managed service eligibility (browser session)
Answers which catalogue package versions and modes one application environment - the namespace an application is, or is about to be, deployed to on a cluster - could set up right now, and for each that it cannot, the reason and what to do: a cluster with no data policy, a cluster that does not deploy through the Ankra native engine, a playground short of capacity, a mode that is not available (Ankra-hosted), a missing permission, and the rest a prepare refuses with. It runs the checks a prepare runs, through the same code, in a transaction it rolls back: no review is recorded, no name reserved and no review quota spent; the name is the one check it cannot make, since the name is chosen at setup. The service is previewed on the environment’s own cluster with the package’s default settings. An environment that is not bound yet is checked the way setup would bind it, which needs the application deployed in that namespace. Capacity the platform cannot establish reads unknown, never fits. It is a preview, not a reservation: it takes no lock, so a review quota, capacity or policy that changes before the setup is prepared can still refuse it, and the prepare answers authoritatively. Requires the applications rollout, applications.read and clusters.read on the cluster to ask, and profiles.read to read the catalogue; a member who may read but not deploy gets every mode blocked with permission_required. package_version_id checks one version; otherwise limit (default 10, at most 25) and after page the catalogue in its own order.
import requests
url = "https://platform.ankra.app/org/service-admission/eligibility"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://platform.ankra.app/org/service-admission/eligibility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/service-admission/eligibility \
--cookie ankra_session={
"environment": {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"consumer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"items": [
{
"package": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publisher_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"version": "<string>",
"capability": "<string>",
"digest": "<string>",
"first_party": true,
"created_at": "2023-11-07T05:31:56Z"
},
"reason": {
"code": "hosted_unavailable",
"message": "<string>",
"fix": "<string>"
},
"modes": [
{
"mode": "hosted",
"state": "available",
"reason": {
"code": "hosted_unavailable",
"message": "<string>",
"fix": "<string>"
},
"capacity": {
"state": "fits",
"reason": "<string>",
"plan_id": "<string>",
"quota": {
"limits_cpu_millicores": 123,
"limits_memory_mib": 123,
"requests_cpu_millicores": 123,
"requests_memory_mib": 123
},
"committed": {
"limits_cpu_millicores": 123,
"limits_memory_mib": 123,
"requests_cpu_millicores": 123,
"requests_memory_mib": 123
},
"transient": {
"limits_cpu_millicores": 123,
"limits_memory_mib": 123,
"requests_cpu_millicores": 123,
"requests_memory_mib": 123
},
"required": {
"limits_cpu_millicores": 123,
"limits_memory_mib": 123,
"requests_cpu_millicores": 123,
"requests_memory_mib": 123
}
},
"secret_inputs": [
"<string>"
]
}
]
}
],
"next_cursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Query Parameters
The application whose environment is previewed.
The cluster the environment deploys to; the service is previewed there.
The namespace the application deploys to on that cluster.
63^[a-z0-9]([-a-z0-9]*[a-z0-9])?$Check this package version only.
1 <= x <= 25The catalogue cursor from the previous page.
Response
The environment, and the verdict for every mode of each package version checked.