Skip to the content.

HomeHelpAdministrator Tools

API Audit Logs

The API Audit Logs feature provides comprehensive tracking and monitoring of all API endpoint access in ShiftLog. This security feature helps administrators monitor API usage, detect unauthorized access attempts, and troubleshoot API integration issues.

Overview

Every API request is automatically logged with detailed information including:

Viewing Audit Logs

To access the API Audit Logs:

  1. Navigate to Administrator Tools in the navigation menu
  2. Select API Audit Logs from the administration section
  3. The logs are displayed in a table format, sorted by most recent first

Filtering Logs

The audit log viewer provides several filtering options:

Filter by User Name

Enter a username in the User Name filter field to view only requests made with that user’s API key. This is helpful for:

Filter by API Key Status

Use the API Key Status dropdown to filter logs by validity:

Invalid API key attempts can help identify:

Refreshing the View

Click the Refresh button to reload the audit logs with the current filter settings. The view automatically loads the most recent 100 entries.

Understanding the Log Display

Valid Key Indicator

Response Status Badge

Response status codes are color-coded for quick identification:

Common status codes:

Security and Privacy

Data Retention

API audit logs are retained in the database indefinitely by default. Administrators should establish a retention policy and periodically archive or delete old logs to manage database size.

Sensitive Information

The audit logs capture:

Access to audit logs should be restricted to administrators only.

Use Cases

Security Monitoring

Troubleshooting

Compliance

Best Practices

  1. Regular Reviews - Review audit logs regularly for suspicious activity
  2. Alert on Failures - Monitor for patterns of invalid API key attempts
  3. Rotate Keys - Periodically rotate API keys and verify logs show expected usage
  4. Archive Old Logs - Establish a retention policy and archive old logs
  5. Investigate Anomalies - Follow up on unexpected patterns or access attempts

API Endpoints Logged

All API endpoints are automatically logged, including: