List hosted log shipping
import requests
url = "https://platform.ankra.app/api/v1/org/hosted-logs"
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/hosted-logs', 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/hosted-logs \
--header 'Authorization: Bearer <token>'{
"available": true,
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"shipping_enabled": true,
"available": true,
"agent_supports_switch": true,
"changed_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Clusters
List hosted log shipping
Every live cluster of the organisation with its hosted log shipping switch, ordered by name: whether the cluster’s container log lines are sent to Ankra’s hosted log store, whether that store is live on this platform (available), and whether the cluster’s agent can obey the switch (agent_supports_switch). Each cluster is answered exactly as GET /api/v1/org/clusters//hosted-logs answers it, so this is the one place to see which clusters ship their logs and which could. Readable by any member of the organisation, like the per-cluster read. Bearer-PAT twin of the browser route of the same name under /org.
GET
/
api
/
v1
/
org
/
hosted-logs
List hosted log shipping
import requests
url = "https://platform.ankra.app/api/v1/org/hosted-logs"
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/hosted-logs', 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/hosted-logs \
--header 'Authorization: Bearer <token>'{
"available": true,
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"shipping_enabled": true,
"available": true,
"agent_supports_switch": true,
"changed_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Authorizations
Response
Successful response
Every live cluster's hosted log shipping switch.