import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/hosted-logs"
payload = { "shipping_enabled": True }
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({shipping_enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/hosted-logs', 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/{cluster_id}/hosted-logs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipping_enabled": true
}
'{
"agent_supports_switch": true,
"available": true,
"changed_at": "2026-10-05T20:00:00Z",
"cluster_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"shipping_enabled": true
}{
"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"
}Set hosted log shipping
Turns hosted log shipping on or off for this cluster (ankra cluster logs-ship enable|disable). While it is on and the hosted store is live, the cluster’s agent sends the log lines of every running container to Ankra’s hosted log store, where members of the organisation can search them; turning it off stops shipping within about a minute. Lines already stored age out with the store’s retention. Every change is recorded in the organisation’s audit log; re-sending the current value changes nothing. Requires clusters.write on the cluster.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/hosted-logs"
payload = { "shipping_enabled": True }
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({shipping_enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/hosted-logs', 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/{cluster_id}/hosted-logs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipping_enabled": true
}
'{
"agent_supports_switch": true,
"available": true,
"changed_at": "2026-10-05T20:00:00Z",
"cluster_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"shipping_enabled": true
}{
"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.
Path Parameters
Body
Turns a cluster's hosted log shipping on or off.
True sends the cluster's container log lines to Ankra's hosted log store; false stops it. Must be a JSON boolean.
Response
Successful response
A cluster's hosted log shipping switch.
The stored switch. Off for every cluster until a member turns it on.
Ankra's hosted log store is live on this platform. While false the switch can be stored, but nothing ships and nothing is read.
The cluster's agent advertised that it obeys the switch. False means no agent can ship yet: the agent needs an upgrade, or hosted log shipping is turned off in its own Helm values.
When the switch last changed; null when nobody has changed it.