import requests
url = "https://platform.ankra.app/org/service-admission/instances/{instance_id}/retirements"
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/instances/{instance_id}/retirements', 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/instances/{instance_id}/retirements \
--cookie ankra_session={
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"schema_version": 1,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation": 2,
"namespace": "<string>",
"stack": {
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"state": "deployed",
"members": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "addon",
"name": "<string>",
"namespace": "<string>"
}
],
"member_digest": "<string>"
},
"nothing_deployed": true,
"owned_draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consumers_to_disconnect": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>"
}
],
"shared_kept": [
{
"stack_name": "<string>",
"title": "<string>"
}
],
"data": {
"namespace_deleted": true,
"volumes_deleted": true,
"secrets_deleted": true,
"export_offered": true,
"restore_points": "kept_per_vault_retention",
"statement": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z"
},
"digest": "<string>",
"state": "pending",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_at": "2023-11-07T05:31:56Z",
"phase": "retire_stack",
"settled_at": "2023-11-07T05:31:56Z",
"outcome": "retired",
"reason": "<string>"
}
],
"next_cursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}List your retirements of a managed service (browser session)
Requires the applications rollout flag, applications.deploy, and on the service cluster clusters.operate, stacks.delete and clusters.read, plus clusters.read on every consumer cluster, all intersected with live token scopes - checked before any retirement is read, and again against every listed plan. Lists only your own retirements of the instance, never another actor’s, read on the primary database so a review prepared a moment ago is already listed: a client whose prepare answer was lost finds the review here instead of preparing again, which would spend another of its 10 open retirements. Each item is the single read’s projection, its state folded against the database clock, so a review past its ten-minute window lists as expired, never pending. state keeps only the retirements in that state. Newest first: ordered by creation time, latest first, with the retirement id breaking ties. next_cursor is the id of the page’s last retirement when more match; pass it as after to continue with older ones. after must name one of your own retirements of this instance: an unknown id, another actor’s or another instance’s retirement, or one deleted by retention since the cursor was issued is refused with 422 (Invalid service review page), and the listing starts again from the first page. A cursor whose retirement has since changed state still continues the listing. Nothing is skipped, so a page shorter than limit is the last one. An instance the organisation does not hold is not found, exactly as for prepare.
import requests
url = "https://platform.ankra.app/org/service-admission/instances/{instance_id}/retirements"
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/instances/{instance_id}/retirements', 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/instances/{instance_id}/retirements \
--cookie ankra_session={
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"schema_version": 1,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation": 2,
"namespace": "<string>",
"stack": {
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"state": "deployed",
"members": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "addon",
"name": "<string>",
"namespace": "<string>"
}
],
"member_digest": "<string>"
},
"nothing_deployed": true,
"owned_draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consumers_to_disconnect": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>"
}
],
"shared_kept": [
{
"stack_name": "<string>",
"title": "<string>"
}
],
"data": {
"namespace_deleted": true,
"volumes_deleted": true,
"secrets_deleted": true,
"export_offered": true,
"restore_points": "kept_per_vault_retention",
"statement": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z"
},
"digest": "<string>",
"state": "pending",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_at": "2023-11-07T05:31:56Z",
"phase": "retire_stack",
"settled_at": "2023-11-07T05:31:56Z",
"outcome": "retired",
"reason": "<string>"
}
],
"next_cursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Path Parameters
Query Parameters
1 <= x <= 50The next_cursor of the previous page: the id of one of your own retirements of this instance. The page continues with the retirements created before it.
Keep only the retirements in this state at database time; omit it for every state. pending finds a review whose prepare answer was lost.
pending, expired, in_progress, settled Response
Your retirements of the instance, newest first.