List log labels
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/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/clusters/{cluster_id}/kubernetes/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/clusters/{cluster_id}/kubernetes/logs/labels \
--header 'Authorization: Bearer <token>'{
"provider": "<string>",
"cluster_attribution": {},
"names": [
"<string>"
],
"values": {},
"source": "<string>",
"note": "<string>"
}{
"detail": "<string>",
"error_code": "<string>"
}Kubernetes
List log labels
Reads label names, or one label’s values, from the cluster’s connected log store or Ankra hosted logs over a time window. Values can be capped; absence does not establish that collection is disabled. Requires kubernetes read access to the cluster.
GET
/
api
/
v1
/
clusters
/
{cluster_id}
/
kubernetes
/
logs
/
labels
List log labels
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/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/clusters/{cluster_id}/kubernetes/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/clusters/{cluster_id}/kubernetes/logs/labels \
--header 'Authorization: Bearer <token>'{
"provider": "<string>",
"cluster_attribution": {},
"names": [
"<string>"
],
"values": {},
"source": "<string>",
"note": "<string>"
}{
"detail": "<string>",
"error_code": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The cluster.
Query Parameters
Return this label's values instead of the label names.
How far back to look, such as 1h.