Get the cluster log source
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/log-source"
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', 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 \
--header 'Authorization: Bearer <token>'{
"endpoint": "<string>",
"provider": "<string>",
"state": "<string>",
"verify_ssl": true,
"credential": {
"name": "<string>",
"state": "<string>",
"auth_scheme": "<string>",
"username": "<string>"
},
"credential_name": "<string>",
"field_mappings": {},
"health": {},
"index_pattern": "<string>",
"tenant_id": "<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"
}{
"detail": "Cluster not found"
}Clusters
Get the cluster log source
Returns the cluster’s registered log source: provider, endpoint, state, health, TLS verification, the credential name it resolves to, and that credential’s name, state, username and authentication scheme. The credential’s password and token are never returned. Returns 404 when the cluster has no log source, 400 when the stored source resolves to no provider, and 502 with a detail naming the credential when the named credential or its secret cannot be resolved. Requires clusters.read on the cluster.
GET
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
log-source
Get the cluster log source
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/log-source"
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', 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 \
--header 'Authorization: Bearer <token>'{
"endpoint": "<string>",
"provider": "<string>",
"state": "<string>",
"verify_ssl": true,
"credential": {
"name": "<string>",
"state": "<string>",
"auth_scheme": "<string>",
"username": "<string>"
},
"credential_name": "<string>",
"field_mappings": {},
"health": {},
"index_pattern": "<string>",
"tenant_id": "<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"
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
Response
The cluster's log source