Get the detected log source
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/log-source/detected"
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}/log-source/detected', 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}/log-source/detected \
--header 'Authorization: Bearer <token>'{
"can_connect": true,
"candidate": {
"endpoint_host": "<string>",
"fingerprint": "<string>",
"provider": "<string>",
"addon_name": "<string>",
"chart_name": "<string>",
"confidence": "<string>",
"credential_name": "<string>",
"service_name": "<string>",
"service_namespace": "<string>"
},
"connect_blocked_reason": "<string>",
"existing_source": {
"endpoint_host": "<string>",
"provider": "<string>"
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Clusters
Get the detected log source
Returns the log store Ankra detects in the cluster from its installed add-ons (for example a Loki or OpenSearch Service), the log source the cluster already has, and whether you could connect the detected one. candidate is null when nothing is detected. can_connect is false with a connect_blocked_reason when nothing is detected, a log source is already connected, or you are not an organisation admin, and null when that could not be checked. The answer carries a provider, a Service identity and an endpoint host, never a secret. Requires clusters.read on the cluster.
GET
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
log-source
/
detected
Get the detected log source
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/log-source/detected"
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}/log-source/detected', 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}/log-source/detected \
--header 'Authorization: Bearer <token>'{
"can_connect": true,
"candidate": {
"endpoint_host": "<string>",
"fingerprint": "<string>",
"provider": "<string>",
"addon_name": "<string>",
"chart_name": "<string>",
"confidence": "<string>",
"credential_name": "<string>",
"service_name": "<string>",
"service_namespace": "<string>"
},
"connect_blocked_reason": "<string>",
"existing_source": {
"endpoint_host": "<string>",
"provider": "<string>"
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.