Audit Logs
The Co-mind.ai platform maintains comprehensive audit logs for all API activity. Use audit logs for compliance reporting, security monitoring, and usage analysis.Audit log access requires JWT authentication with Admin role and the
auditView privilege.Endpoint
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/v1/admin/audit-logs | GET | Admin (JWT) | Query audit logs with filters and aggregation |
Query Audit Logs
Filtering
Audit logs support rich filtering to narrow down results:| Parameter | Type | Description |
|---|---|---|
start | ISO 8601 datetime | Start of the time range |
end | ISO 8601 datetime | End of the time range |
user_id | string | Filter by specific user |
action | string | Filter by action type (e.g., chat.completion, auth.login) |
resource | string | Filter by resource type |
status | string | Filter by status (success, error) |
limit | integer | Maximum results to return (default: 50) |
offset | integer | Pagination offset |
Filter by User
Filter by Action
Use Cases
Compliance Reporting
Generate reports showing who accessed what data, when, and from where.
Security Monitoring
Track failed login attempts, unusual API patterns, and token usage.
Usage Analytics
Analyze API usage by endpoint, user, model, and time period.
Incident Investigation
Trace specific requests and responses during security incidents.
Common Queries
Failed login attempts in the last 24 hours
Failed login attempts in the last 24 hours
All chat completions by a specific user
All chat completions by a specific user
Token creation and revocation events
Token creation and revocation events

