Export Audit Log
curl --request GET \
--url http://{host}:{port}/{basePath}/audit/export \
--header 'Authorization: <api-key>'{
"apiVersion": "v1",
"kind": "AuditExport",
"metadata": {
"exportedAt": "2026-03-19T16:00:00Z",
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-19T16:00:00Z",
"totalRecords": 1250,
"format": "json"
},
"records": [
{
"id": "audit-20260301-001",
"timestamp": "2026-03-01T00:05:00Z",
"action": "runbook.create",
"user": "admin@empresa.com",
"role": "admin",
"resource": "runbook-disk-cleanup",
"resourceType": "Runbook",
"namespace": "production",
"sourceIP": "10.0.1.10",
"checksum": "sha256:a1b2c3d4..."
}
]
}
Audit
Exportar Auditoria
Exporta o log de auditoria completo em formato CSV ou JSON para compliance e análise externa
GET
/
audit
/
export
Export Audit Log
curl --request GET \
--url http://{host}:{port}/{basePath}/audit/export \
--header 'Authorization: <api-key>'{
"apiVersion": "v1",
"kind": "AuditExport",
"metadata": {
"exportedAt": "2026-03-19T16:00:00Z",
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-19T16:00:00Z",
"totalRecords": 1250,
"format": "json"
},
"records": [
{
"id": "audit-20260301-001",
"timestamp": "2026-03-01T00:05:00Z",
"action": "runbook.create",
"user": "admin@empresa.com",
"role": "admin",
"resource": "runbook-disk-cleanup",
"resourceType": "Runbook",
"namespace": "production",
"sourceIP": "10.0.1.10",
"checksum": "sha256:a1b2c3d4..."
}
]
}
Formato de exportação:
csv, jsonData de início no formato ISO 8601 (ex:
2026-03-01T00:00:00Z)Data de fim no formato ISO 8601 (padrão: agora)
Filtrar por tipo de ação
Filtrar por usuário
Filtrar por namespace
{
"apiVersion": "v1",
"kind": "AuditExport",
"metadata": {
"exportedAt": "2026-03-19T16:00:00Z",
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-19T16:00:00Z",
"totalRecords": 1250,
"format": "json"
},
"records": [
{
"id": "audit-20260301-001",
"timestamp": "2026-03-01T00:05:00Z",
"action": "runbook.create",
"user": "admin@empresa.com",
"role": "admin",
"resource": "runbook-disk-cleanup",
"resourceType": "Runbook",
"namespace": "production",
"sourceIP": "10.0.1.10",
"checksum": "sha256:a1b2c3d4..."
}
]
}
id,timestamp,action,user,role,resource,resourceType,namespace,sourceIP,checksum
audit-20260301-001,2026-03-01T00:05:00Z,runbook.create,admin@empresa.com,admin,runbook-disk-cleanup,Runbook,production,10.0.1.10,sha256:a1b2c3d4...
audit-20260301-002,2026-03-01T01:15:00Z,incident.acknowledge,carlos.silva@empresa.com,operator,INC-20260301-001,Incident,production,10.0.1.50,sha256:e5f6g7h8...
Content-Type: text/csv e o header Content-Disposition: attachment; filename="audit-export-20260319.csv" para download automático.
Para exportações grandes (mais de 10.000 registros), a API retorna um 202 Accepted com um link para download assincrono:
{
"apiVersion": "v1",
"kind": "AuditExportJob",
"metadata": {
"jobId": "export-20260319-001"
},
"status": {
"state": "processing",
"estimatedRecords": 45000,
"downloadUrl": "/api/v1/audit/export/download/export-20260319-001",
"expiresAt": "2026-03-19T22:00:00Z"
}
}
Autorizações
Bearer token issued by the operator. Format: Authorization: Bearer <token>.
Parâmetros de consulta
Export format.
Opções disponíveis:
csv, json Start date (ISO 8601).
Exemplo:
"2026-03-01T00:00:00Z"
End date (ISO 8601). Default: now.
Filter by action type.
Filter by user.
Filter by namespace.
⌘I