Set hosted log shipping
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"
}Clusters
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.
PUT
/
api
/
v1
/
org
/
clusters
/
{cluster_id}
/
hosted-logs
Set hosted log shipping
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
Body
application/json
Response
Successful response
A cluster's hosted log shipping switch.