import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables/{variable_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables/{variable_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables/{variable_name} \
--header 'Authorization: Bearer <token>'{
"changed": true,
"commit_sha": "<string>",
"commit_url": "<string>",
"job_count": 123,
"operation_id": "<string>",
"set": {},
"stack_name": "<string>",
"unset": [
"<string>"
]
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Remove one stack variable (browser session)
Removes one stack variable. Removing a variable the stack does not hold answers 200 with changed false. The edit is merged into the deployed variables under the cluster lock, so keys it does not name are never overwritten, including a key the application image-tag lane moved a moment earlier. It is a live write: a pending draft of the stack is neither read nor published, and the stack’s description, deploy wave and members are kept. A pending draft of the stack picks this write 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. Requires stacks.write on the cluster. 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/{variable_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables/{variable_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/variables/{variable_name} \
--header 'Authorization: Bearer <token>'{
"changed": true,
"commit_sha": "<string>",
"commit_url": "<string>",
"job_count": 123,
"operation_id": "<string>",
"set": {},
"stack_name": "<string>",
"unset": [
"<string>"
]
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"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.
Response
The edit was applied, or the live stack already satisfied it (changed false, nothing written).
False when the live stack already satisfied the edit and nothing was written.
Show child attributes
Show child attributes