Set the cluster external log viewer
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/external-log-viewer"
payload = {
"url_template": "<string>",
"display_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url_template: '<string>', display_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/external-log-viewer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/external-log-viewer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url_template": "<string>",
"display_name": "<string>"
}
'{
"url_template": "<string>",
"display_name": "<string>",
"updated_at": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Clusters
Set the cluster external log viewer
The bearer twin of the portal’s external log viewer editor, for the Ankra app and scripts. Sets the link out to the log viewer the team already uses (Grafana, Kibana, Datadog and so on), replacing any earlier one. Requires clusters.write on the cluster.
PUT
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
external-log-viewer
Set the cluster external log viewer
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/external-log-viewer"
payload = {
"url_template": "<string>",
"display_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url_template: '<string>', display_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/external-log-viewer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/external-log-viewer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url_template": "<string>",
"display_name": "<string>"
}
'{
"url_template": "<string>",
"display_name": "<string>",
"updated_at": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Body
application/json