import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables"
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/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables \
--header 'Authorization: Bearer <token>'{
"delete_pending": true,
"deploy_wave": 1,
"description": "<string>",
"has_pending_draft": true,
"stack_name": "<string>",
"variables": {}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}The stack's deployed variables (browser session)
The stack’s deployed variables, deploy wave and description, read from the live stack only. Unlike the stack listing, a pending draft never contributes to this read; has_pending_draft says whether one exists. A pending draft picks live variable writes up when it is next reconciled against the deployed stack, and publishing the draft merges its variables with the live stack key by key: only a variable the draft itself changed keeps the draft’s value. A variable added live after the draft last reconciled is one the draft never saw, so it is kept: publishing the draft cannot remove it. Browser-session twin of the /api/v1 route; a write also requires the X-Ankra-CSRF header.
import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables"
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/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables \
--header 'Authorization: Bearer <token>'{
"delete_pending": true,
"deploy_wave": 1,
"description": "<string>",
"has_pending_draft": true,
"stack_name": "<string>",
"variables": {}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.