List where an organisation variable is used
import requests
url = "https://platform.ankra.app/api/v1/org/variables/{variable_name}/usage"
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/variables/{variable_name}/usage', 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/variables/{variable_name}/usage \
--header 'Authorization: Bearer <token>'{
"name": "<string>",
"unreadable": 123,
"usages": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"draft": true,
"kind": "manifest",
"name": "<string>",
"shadowed_by": "cluster",
"stack_name": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Variables
List where an organisation variable is used
Lists the live stack members in the organisation that refer to the variable as ${{ ankra.<name> }}: manifests, applications, add-on values and namespaces, and stack variables, each with its cluster and stack, and whether a cluster or stack variable of the same name shadows the organisation value. Needs variables.read; never carries a value. unreadable counts members whose stored content could not be decoded, so a non-zero count means the list may be incomplete.
GET
/
api
/
v1
/
org
/
variables
/
{variable_name}
/
usage
List where an organisation variable is used
import requests
url = "https://platform.ankra.app/api/v1/org/variables/{variable_name}/usage"
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/variables/{variable_name}/usage', 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/variables/{variable_name}/usage \
--header 'Authorization: Bearer <token>'{
"name": "<string>",
"unreadable": 123,
"usages": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"draft": true,
"kind": "manifest",
"name": "<string>",
"shadowed_by": "cluster",
"stack_name": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.