Read labels from the selected cluster log store
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/logs/labels"
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/imported/{cluster_id}/logs/labels', 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/imported/{cluster_id}/logs/labels \
--header 'Authorization: Bearer <token>'{
"provider": "<string>",
"source": "<string>",
"note": "<string>",
"names": [
"<string>"
],
"values": {},
"cluster_attribution": {}
}Clusters
Read labels from the selected cluster log store
Namespace, pod and container values observed in the time window. Values can be capped and absence does not establish that collection is disabled. Use the same source choice as the history query.
This is the API-token route. It requires kubernetes.logs on the cluster, and a token’s scopes narrow it.
GET
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
logs
/
labels
Read labels from the selected cluster log store
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/logs/labels"
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/imported/{cluster_id}/logs/labels', 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/imported/{cluster_id}/logs/labels \
--header 'Authorization: Bearer <token>'{
"provider": "<string>",
"source": "<string>",
"note": "<string>",
"names": [
"<string>"
],
"values": {},
"cluster_attribution": {}
}Authorizations
Query Parameters
Read auto (connected source first, hosted only when no source is connected), connected only, or Ankra hosted logs only. An explicit choice never switches on empty results or failure and does not alter the saved connection.
Available options:
auto, connected, ankra_hosted