Audit
Hash-chained audit trail for compliance and debugging. Every operation is logged with cryptographic verification for tamper-evident logs.
Query Audit Events
Endpoint: GET /v1/audit
Query audit events with filtering and pagination.
Query Parameters
agent_id(required): Agent IDoperations(optional): Filter by operation types (comma-separated)limit(optional): Maximum number of results (default: 100)offset(optional): Pagination offsetstart_time(optional): Start time for filtering (ISO 8601)end_time(optional): End time for filtering (ISO 8601)
Get Audit Event
Endpoint: GET /v1/audit/:id
Get a specific audit event by ID.
Verify Chain Integrity
Endpoint: POST /v1/audit/verify
Verify that the audit chain hasn't been tampered with.
Request
POST /v1/audit/verify
Content-Type: application/json
X-API-Key: your-api-key
{
"agent_id": "agt_abc123"
}Response
{
"valid": true,
"events_checked": 150,
"chain_intact": true
}Export Audit Logs
Endpoint: POST /v1/audit/export
Export audit logs for compliance reporting.
Request
POST /v1/audit/export
Content-Type: application/json
X-API-Key: your-api-key
{
"agent_id": "agt_abc123",
"format": "json",
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-01-31T23:59:59Z"
}