import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/from-profile"
payload = { "profile_id": "<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({profile_id: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/from-profile', 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/clusters/imported/{cluster_id}/stacks/from-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>"
}
'{
"addons_count": 123,
"draft_id": "<string>",
"manifests_count": 123,
"profile_version": 123,
"stack_name": "<string>",
"deployed": false,
"dry_run": true,
"job_count": 0,
"member_removals": [
{
"confirmed": true,
"deployed_by_profile": true,
"kind": "<string>",
"name": "<string>"
}
],
"operation_id": "<string>",
"warnings": []
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create a stack from a stack profile
Instantiates a stack profile version on the cluster with the parameter values you supply, creating a stack draft and deploying it when deploy is set. Requires stacks.write; missing or invalid parameters, unresolvable variables and draft errors answer 400, and a deprecated version answers 409.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/from-profile"
payload = { "profile_id": "<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({profile_id: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/from-profile', 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/clusters/imported/{cluster_id}/stacks/from-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>"
}
'{
"addons_count": 123,
"draft_id": "<string>",
"manifests_count": 123,
"profile_version": 123,
"stack_name": "<string>",
"deployed": false,
"dry_run": true,
"job_count": 0,
"member_removals": [
{
"confirmed": true,
"deployed_by_profile": true,
"kind": "<string>",
"name": "<string>"
}
],
"operation_id": "<string>",
"warnings": []
}{
"detail": "Cluster not found"
}{
"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
Show child attributes
Show child attributes
Replace the contents of the stack already deployed from this profile under new_stack_name (or the profile's stack name) with this version, in place, instead of creating a new stack draft. The stack-name and resource renames are skipped, the update is applied immediately (deploy is implied), and the profile's deployment tracking moves to the new version. Answers 404 when no stack runs under that name, and 409 when the stack was not deployed from this profile, when the stack now under the name is not the one the profile deployed (it was deleted or renamed and another took its name), or when the deployment record predates stack identity tracking and cannot prove the stack is the profile's (re-record it with adopt). A member the version no longer lists is removed only when the deployment record shows the profile put it there; any other removal answers 422 STACK_MEMBER_REMOVAL_UNCONFIRMED naming the members, unless confirmed_member_removals names them.
Retired. It used to admit every chart downgrade in the upgrade; it is still accepted as a boolean (and still only together with upgrade_existing), but it admits nothing. Send confirmed_chart_downgrades instead.
The chart downgrades the person confirmed for an in-place upgrade, after the same request was refused with CHART_VERSION_DOWNGRADE because this profile version pins add-ons to older chart versions than the live stack declares. Each entry admits exactly the move it names; any other downgrade is refused again, naming every move. Accepted only together with upgrade_existing (422 otherwise).
200Show child attributes
Show child attributes
The members, as kind/name (kind addon, manifest or application), the person confirmed an in-place upgrade may remove although this profile's deployment record does not show the profile put them there, after the same request was refused with STACK_MEMBER_REMOVAL_UNCONFIRMED or previewed with dry_run. Each entry admits exactly that removal; any other is refused again. Accepted only together with upgrade_existing (422 otherwise).
200Preview an in-place upgrade: the target stack and the members the upgrade would remove are judged exactly as the upgrade would judge them, nothing is written, and the answer carries dry_run and member_removals. Accepted only together with upgrade_existing (422 otherwise).
Response
Successful Response
Present, and true, only on the answer to a dry_run upgrade: nothing was written.
Present only on the answer to a dry_run upgrade: every member the upgrade would remove, with deployed_by_profile (the deployment record shows the profile put it there, so it is removed without asking) and confirmed (named in confirmed_member_removals). A removal that is neither refuses the real upgrade.
Show child attributes
Show child attributes