import requests
url = "https://platform.ankra.app/api/v1/org/decisions/{decision_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/decisions/{decision_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/decisions/{decision_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"area": "security",
"kind": "<string>",
"subject": {},
"summary": "<string>",
"plan": {},
"evidence": {},
"status": "proposed",
"source": "<string>",
"created_by": "<string>",
"decided_by": "<string>",
"decided_at": "2023-11-07T05:31:56Z",
"decision_note": "<string>",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"receipt": {
"steps": [
{
"name": "<string>",
"outcome": "dispatched",
"detail": "<string>",
"evidence": {}
}
],
"claimed_at": "2023-11-07T05:31:56Z",
"executed_by": "<string>",
"dispatched_at": "2023-11-07T05:31:56Z",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"execution_status": "<string>"
},
"dedupe_key": "<string>",
"executable": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Read one decision proposal
One proposal with its plan, evidence, decision and receipt. A running proposal is settled first: the terminal status of its platform operation becomes succeeded or failed, with the outcome appended to the receipt. Bearer-PAT twin of the browser route of the same name under /org; the console’s session cookie is not accepted here and the browser route answers a token with a login redirect.
import requests
url = "https://platform.ankra.app/api/v1/org/decisions/{decision_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/decisions/{decision_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/decisions/{decision_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"area": "security",
"kind": "<string>",
"subject": {},
"summary": "<string>",
"plan": {},
"evidence": {},
"status": "proposed",
"source": "<string>",
"created_by": "<string>",
"decided_by": "<string>",
"decided_at": "2023-11-07T05:31:56Z",
"decision_note": "<string>",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"receipt": {
"steps": [
{
"name": "<string>",
"outcome": "dispatched",
"detail": "<string>",
"evidence": {}
}
],
"claimed_at": "2023-11-07T05:31:56Z",
"executed_by": "<string>",
"dispatched_at": "2023-11-07T05:31:56Z",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"execution_status": "<string>"
},
"dedupe_key": "<string>",
"executable": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
Response
Successful response
One proposal of the decision ledger: what it is about, what the surface computed, where it stands, who decided, and what running it did.
security or cost; decides which permission approving and running it takes.
security, cost What the proposal does, e.g. addon_upgrade, image_rebuild, right_size, off_hours_schedule, waste_cleanup. Only kinds with a platform operation are executable.
Identity of what the proposal is about (finding_id, cluster_id, addon_name, waste_finding_id ...), one document per kind.
The steps the surface computed. plan.parameters is the machine half the executable kinds are called with: addon_upgrade takes {cluster_id, addon_name, chart_version}; off_hours_schedule takes {cluster_id, timezone, schedules: [{action, stop_mode, cron_expression}]}; waste_cleanup takes {waste_finding_id}.
proposed, approved, set_aside, running, succeeded, failed, superseded Which surface computed it (default "surface").
Ankra user id of whoever posted it.
Ankra user id of the last approve or set-aside.
The platform execution a run dispatched, to watch under /api/v1/org/executions.
The record of running a proposal: who ran it and when, the platform operation it became, the steps taken and how it ended.
Show child attributes
Show child attributes
Whether the platform has an operation for the kind, so a surface offers "run" only where running can work.