/v1/swarm/logs
endpoint provides detailed information about your API usage history, including request timestamps, status codes, and execution details.
Logs are filtered to exclude any entries containing client IP addresses for privacy protection. Access is limited to logs associated with your API key.
Quick Start
- Python
- JavaScript
- cURL
Understanding Log Response
The logs endpoint returns structured information about your API usage:Log Analysis and Filtering
- Python
- JavaScript
Log Export and Backup
- Python
- JavaScript
Log Monitoring Dashboard
- Python
- JavaScript
Privacy and Security
Data Protection
- IP Address Filtering: All client IP addresses are automatically filtered from logs
- PII Protection: Personal identifiable information is not logged
- Secure Storage: Logs are stored securely with encryption at rest
- Access Control: Only accessible via your API key
Compliance
- GDPR Compliant: Adheres to data protection regulations
- Audit Trail: Maintains complete audit trail of API usage
- Data Retention: Logs retained for compliance and debugging purposes
- Access Logging: All log access is itself logged for security
Best Practices
Log Management
- Regular Monitoring: Check logs regularly for unusual patterns
- Error Analysis: Investigate error spikes promptly
- Cost Tracking: Monitor API costs and optimize usage
- Performance Analysis: Track response times and identify bottlenecks
- Security Monitoring: Watch for unauthorized access attempts
Data Analysis
- Trend Analysis: Identify usage patterns and growth trends
- Error Pattern Recognition: Detect recurring issues
- Cost Optimization: Find opportunities to reduce API costs
- Performance Optimization: Identify slow endpoints and optimize
- Capacity Planning: Plan for future usage growth
Automation
- Alert Setup: Set up alerts for high error rates or costs
- Automated Reports: Generate regular usage reports
- Anomaly Detection: Automatically detect unusual patterns
- Cost Controls: Implement automatic cost limiting
- Performance Monitoring: Continuous performance tracking
Troubleshooting
Common Issues
Empty Logs Response- Logs are filtered for privacy (no IP addresses)
- Some requests may not be logged due to high volume
- Check your API key permissions