MCP Gateway
ApiObservability

Run log cleanup

Delete logs older than the retention period. Returns count of deleted records per log table.

POST
/api/v1/observability/logs/cleanup

Query Parameters

retention_days?|

Override retention days (uses settings if not provided)

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/observability/logs/cleanup"
{
  "mcp_tool_call_logs": 0,
  "token_usage_logs": 0,
  "total": 0,
  "retention_days": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}