Overview
System Components
- Audit Logs: Complete trail of all user actions and system events
- Analytics: Historical usage patterns and performance metrics
- Monitoring: System health checks and real-time status
- Alerting: Email notifications for critical events and thresholds
- Resource Tracking: Quota usage and limits monitoring
Data Retention
All logs and analytics data are retained according to the standard data retention policy:- Hot Storage: 8 days for immediate access
- Total Retention: 90 days for compliance and analysis
Audit Logs
Fetch Audit Logs
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
clientId | String | No | Filter by specific client/user ID |
startTime | String | No | Start time (ISO 8601 format) |
endTime | String | No | End time (ISO 8601 format) |
actionType | String | No | Filter by action type |
category | String | No | Filter by log category: “info”, “warning”, “error”, “security” |
page | Integer | No | Page number (default: 1) |
limit | Integer | No | Results per page (default: 100, max: 1000) |
user_login/user_logoutdocument_upload/document_deletepipeline_create/pipeline_execute/pipeline_deleteagent_create/agent_call/agent_deleteconnector_create/connector_update/connector_deletepermission_denied/authentication_failedrate_limit_exceeded/quota_exceededsystem_error/security_violation
Analytics
User Analytics
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
userId | String | Yes | User ID (users can only access their own data) |
| Parameter | Type | Required | Description |
|---|---|---|---|
timeRange | String | No | Time range: “daily”, “weekly”, “monthly” (default: “weekly”) |
startDate | String | No | Start date (YYYY-MM-DD format) |
endDate | String | No | End date (YYYY-MM-DD format) |
System Analytics (Admin Only)
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
timeRange | String | No | Time range: “daily”, “weekly”, “monthly” (default: “weekly”) |
startDate | String | No | Start date (YYYY-MM-DD format) |
endDate | String | No | End date (YYYY-MM-DD format) |
Agent Analytics
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | String | No | Filter by specific agent ID |
agentType | String | No | Filter by agent type: “builtin” or “custom” |
timeRange | String | No | Time range: “daily”, “weekly”, “monthly” (default: “weekly”) |
Pipeline Analytics
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
pipelineId | String | No | Filter by specific pipeline ID |
userId | String | No | Filter by pipeline creator |
timeRange | String | No | Time range: “daily”, “weekly”, “monthly” (default: “weekly”) |
Resource Analytics
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
resourceType | String | No | Filter by resource type: “storage”, “api”, “pipelines”, “documents” |
timeRange | String | No | Time range: “daily”, “weekly”, “monthly” (default: “weekly”) |
Resource Quotas
Get Current Quotas
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
userId | String | No | Get quotas for specific user (admin only) |
Organization Quotas (Admin Only)
EndpointSystem Health & Status
Health Check
EndpointAlerting System
Configure Alert Rules
Endpoint| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Human-readable alert rule name |
description | String | No | Alert rule description |
rule_type | String | Yes | Type of alert: “quota_threshold”, “latency_threshold”, “error_rate”, “system_health” |
conditions | Object | Yes | Alert conditions and thresholds |
notification | Object | Yes | Notification settings |
enabled | Boolean | No | Whether alert is active (default: true) |
List Alert Rules
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
enabled | Boolean | No | Filter by enabled status |
rule_type | String | No | Filter by rule type |
Update Alert Rule
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
ruleId | String | Yes | Alert rule ID |
Delete Alert Rule
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
ruleId | String | Yes | Alert rule ID |
Scheduled Exports
Schedule Log Export
Endpoint| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Human-readable export name |
export_type | String | Yes | Type of export: “audit_logs”, “analytics”, “quotas” |
format | String | Yes | Export format: “json” or “txt” |
filters | Object | No | Filters to apply to the export |
schedule | Object | Yes | Scheduling configuration |
delivery | Object | Yes | Delivery method configuration |
enabled | Boolean | No | Whether export is active (default: true) |
List Scheduled Exports
EndpointUpdate Scheduled Export
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
exportId | String | Yes | Export schedule ID |
Delete Scheduled Export
Endpoint| Parameter | Type | Required | Description |
|---|---|---|---|
exportId | String | Yes | Export schedule ID |
Error Handling
Common Error Codes
| Error Code | HTTP Status | Description |
|---|---|---|
INSUFFICIENT_PERMISSIONS | 403 | User lacks permission to access logs/analytics |
INVALID_TIME_RANGE | 400 | Invalid date format or time range |
RESOURCE_NOT_FOUND | 404 | Requested resource (user, pipeline, etc.) not found |
ALERT_RULE_LIMIT_EXCEEDED | 400 | Too many alert rules configured |
INVALID_ALERT_CONDITIONS | 400 | Alert conditions are malformed |
EXPORT_SCHEDULE_CONFLICT | 409 | Scheduled export with same name already exists |
QUOTA_EXCEEDED | 429 | Export or analytics request limit reached |
Error Response Format
Best Practices
Efficient Log Analysis
Monitoring Dashboard Integration
Performance Monitoring
- Set up proactive alerts for critical thresholds
- Monitor quota usage to prevent service interruptions
- Track error rates to identify system issues early
- Analyze usage patterns to optimize resource allocation
- Regular security reviews of audit logs
Alert Configuration Strategy
Integration Notes
Upcoming Features
- Slack Integration: Alert delivery via Slack channels (coming soon)
- Microsoft Teams Integration: Alert delivery via Teams channels (coming soon)
- Real-time Monitoring: WebSocket-based real-time event streaming (planned)
- External Tool Integration: Prometheus metrics and Grafana dashboards (planned)
Current Limitations
- Email is the only supported alert delivery method
- Historical data only (no real-time streaming)
- Log exports limited to JSON and TXT formats
- No external monitoring tool integrations yet