import requests
url = "https://platform.ankra.app/org/applications/{application_id}/launch-plan/approvals"
payload = {
"plan_hash": "<string>",
"cluster_id": "<string>",
"action_keys": ["<string>"]
}
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({plan_hash: '<string>', cluster_id: '<string>', action_keys: ['<string>']})
};
fetch('https://platform.ankra.app/org/applications/{application_id}/launch-plan/approvals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/applications/{application_id}/launch-plan/approvals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_hash": "<string>",
"cluster_id": "<string>",
"action_keys": [
"<string>"
]
}
'{
"id": "<string>",
"application_id": "<string>",
"cluster_id": "<string>",
"approved_by": "<string>",
"commit_sha": "<string>",
"plan_hash": "<string>",
"action_list_hash": "<string>",
"schema_version": "<string>",
"actions": [
{
"key": "<string>",
"kind": "stack",
"subject": "<string>",
"title": "<string>",
"tool": "<string>",
"permission": "<string>",
"is_cluster_scoped": true,
"bound_parameters": {},
"free_parameters": [
"<string>"
],
"is_value_included": true
}
],
"accepted_decisions": [
"<string>"
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"claims": [
{
"action_key": "<string>",
"claimed_by": "<string>",
"claimed_via": "session",
"claimed_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Approve an application's Launch Plan (browser session)
Approves the application’s live Launch Plan once for a bounded, enumerated action list (ankra-bjkszh.8): the stacks the plan installs in the target cluster, the environment values a person enters (by name; a value only with secret_value_consent), applying them, merging setup pull requests Ankra opened and proved on the application’s own repository, the deploy, and the ankra.cc domain. The approval binds to plan_hash from the Launch Plan read and is refused when the plan changed; every open decision must be accepted. Only a person approves: a browser session, or a token whose scopes name ai_actions.approve. The approver must hold every approved action’s permission, and the approval expires (one hour by default, at most 24). Requires applications.write. Audited.
import requests
url = "https://platform.ankra.app/org/applications/{application_id}/launch-plan/approvals"
payload = {
"plan_hash": "<string>",
"cluster_id": "<string>",
"action_keys": ["<string>"]
}
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({plan_hash: '<string>', cluster_id: '<string>', action_keys: ['<string>']})
};
fetch('https://platform.ankra.app/org/applications/{application_id}/launch-plan/approvals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/applications/{application_id}/launch-plan/approvals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_hash": "<string>",
"cluster_id": "<string>",
"action_keys": [
"<string>"
]
}
'{
"id": "<string>",
"application_id": "<string>",
"cluster_id": "<string>",
"approved_by": "<string>",
"commit_sha": "<string>",
"plan_hash": "<string>",
"action_list_hash": "<string>",
"schema_version": "<string>",
"actions": [
{
"key": "<string>",
"kind": "stack",
"subject": "<string>",
"title": "<string>",
"tool": "<string>",
"permission": "<string>",
"is_cluster_scoped": true,
"bound_parameters": {},
"free_parameters": [
"<string>"
],
"is_value_included": true
}
],
"accepted_decisions": [
"<string>"
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"claims": [
{
"action_key": "<string>",
"claimed_by": "<string>",
"claimed_via": "session",
"claimed_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
A plan-level approval of the application's live Launch Plan.
plan_hash from the Launch Plan read the approver saw.
The cluster the application launches on.
The approved actions, each a key the plan derives for this target.
Variables whose value Ankra may write; every other approved variable is covered by name only.
Every decision the plan leaves to a person, accepting its default.
Setup pull requests on the application's repository, each proven by Ankra, to merge.
Lifetime of the approval, 60 to 86400 seconds; one hour when omitted.
Response
The recorded approval
One plan-level approval: who approved which exact plan (plan_hash) for which action list (action_list_hash), on which cluster, until when, and what was claimed under it.
Show child attributes
Show child attributes
active, expired, revoked Show child attributes
Show child attributes