import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/applications"
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/clusters/{cluster_id}/applications', 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/clusters/{cluster_id}/applications \
--header 'Authorization: Bearer <token>'{
"applications": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"namespace": "<string>",
"environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"role": "playground"
}
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List the applications on a cluster
Every application placed on the cluster, one row per placement (an application in two namespaces is two rows), sorted by application name, then namespace. environment is the environment the application’s own environment ladder files that placement under for the same caller (GET /org/applications//environments): its stored environment, or the cluster itself (its id and name) when the placement is in none, with the role read from where that environment runs. A caller confined to a project is told the role from that project’s clusters only, as their ladder is. Applications are those the application list shows the caller; drafts place nothing and are not rows, and neither is an installation being removed. An empty list is a cluster with no applications on it; a cluster outside the caller’s scope answers 404.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/applications"
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/clusters/{cluster_id}/applications', 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/clusters/{cluster_id}/applications \
--header 'Authorization: Bearer <token>'{
"applications": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"namespace": "<string>",
"environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"role": "playground"
}
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}