> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing Database Growth

> Manages that data logged in Apinizer may not be meaningful after a certain period and may lead to database growth. Provides scripts and methods for regularly cleaning MongoDB collections.

<CardGroup cols={2}>
  <Card title="Cleaning apinizer_log Collection" href="/en/operations/database-growth-management/apinizer-log-collection-cleanup">
    Cleaning software log records generated during API Proxy message flows
  </Card>

  <Card title="Cleaning audit_event Collection" href="/en/operations/database-growth-management/audit-event-collection-cleanup">
    Cleaning the collection where changes made by users on the system are recorded
  </Card>

  <Card title="Cleaning history_acl Collection" href="/en/operations/database-growth-management/history-acl-collection-cleanup">
    Cleaning the collection where API Proxy and API Proxy Group access permissions are recorded
  </Card>

  <Card title="Cleaning alert_history Collection" href="/en/operations/database-growth-management/alert-history-collection-cleanup">
    Cleaning the collection where alert operations are recorded
  </Card>

  <Card title="Cleaning log_tokentraffic Collection" href="/en/operations/database-growth-management/log-tokentraffic-collection-cleanup">
    Cleaning message records for incoming and outgoing token requests
  </Card>

  <Card title="Cleaning anomaly_detector_result Collection" href="/en/operations/database-growth-management/anomaly-detector-result-collection-cleanup">
    Cleaning records kept for anomaly detection in API traffic
  </Card>

  <Card title="Cleaning uptime_monitor_result Collection" href="/en/operations/database-growth-management/uptime-monitor-result-collection-cleanup">
    Cleaning log records for Uptime Monitoring operation results
  </Card>

  <Card title="Cleaning taskflow_execution_log Collection" href="/en/operations/database-growth-management/taskflow-execution-log-collection-cleanup">
    Cleaning log records for actions in Integration Task Flow steps
  </Card>

  <Card title="Cleaning report_configuration_result Collection" href="/en/operations/database-growth-management/report-configuration-result-collection-cleanup">
    Cleaning software log records generated during report definition execution
  </Card>

  <Card title="Cleaning Trace Log Collections" href="/en/operations/database-growth-management/trace-log-collections-cleanup">
    Cleaning detailed API traffic records generated when Trace is enabled
  </Card>

  <Card title="Cleaning user_token_blackList Collection" href="/en/operations/database-growth-management/user-token-blacklist-collection-cleanup">
    Cleaning records kept when users log in multiple times
  </Card>

  <Card title="Cleaning notification_user Collection" href="/en/operations/database-growth-management/notification-user-collection-cleanup">
    Cleaning records where user notifications are kept
  </Card>

  <Card title="Cleaning tcp_connectivity_test_history Collection" href="/en/operations/database-growth-management/tcp-connectivity-test-history-collection-cleanup">
    Cleaning TCP connectivity test result records
  </Card>

  <Card title="Cleaning persistent_audit_event Collection" href="/en/operations/database-growth-management/persistent-audit-event-collection-cleanup">
    Cleaning API Manager login attempt records
  </Card>

  <Card title="Cleaning portal_login_logs Collection" href="/en/operations/database-growth-management/portal-login-logs-collection-cleanup">
    Cleaning API Portal login attempt records
  </Card>
</CardGroup>

## Database Collection Names

The following table shows the MongoDB collections used in Apinizer and the data they contain:

| Page Name                                                                                                                   | Collection Name in Database            | Description                                                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Application Logs](/en/develop/monitoring-analysis/application-logs)                                                        | `apinizer_log`                         | Records for software logs generated during the execution of the flow for incoming and outgoing messages to API Proxy                                                                                                                                                                                                   |
| [Audit Records](/en/admin/audit-compliance/audit-records)                                                                   | `audit_event`                          | Collection where changes made by users on the system are recorded. Operations performed are recorded with parameters such as date, operation type, user, object ID, object name, and audit object type                                                                                                                 |
| [ACL Audit Records](/en/admin/audit-compliance/audit-records)                                                               | `history_acl`                          | Collection where user information (credential) records are kept for granting or revoking access permissions to API Proxy or API Proxy Group. Information such as operation date, operation type, reason, which user it applies to, which API Proxy/API Proxy Group and method it applies to is kept in this collection |
| [Alert](/en/monitor/alarm)                                                                                                  | `alert_history`                        | Information such as operation time, message information in the action, and which object triggered it for alerts created using actions under certain conditions on Apinizer                                                                                                                                             |
| [Token Requests](/en/develop/policies/token-service/overview)                                                               | `log_tokentraffic`                     | Records for relevant parts of incoming and outgoing messages for token requests                                                                                                                                                                                                                                        |
| [Anomaly Detector](/en/monitor/anomaly-detector)                                                                            | `anomaly_detector_result`              | Records kept to find anomalies in API traffic                                                                                                                                                                                                                                                                          |
| [Uptime Monitor](/en/monitor/api-health-check)                                                                              | `uptime_monitor_result`                | Log records for Uptime Monitoring operation results                                                                                                                                                                                                                                                                    |
| [Task Flow](/en/integrations/api-integrator-task-flow-builder/taskflow-monitor)                                             | `taskflow_execution_log`               | Records for logs generated during the execution of actions in Integration Task Flow steps                                                                                                                                                                                                                              |
| [Report Generator](/en/analytic/analytics-reports/report-generator)                                                         | `report_configuration_result`          | Records for software logs generated during report definition execution                                                                                                                                                                                                                                                 |
| [Trace](/en/develop/monitoring-analysis/step-by-step-tracing)                                                               | `log_apiproxytraffic`                  | Collection that records information about API traffic when Trace is enabled in API Proxy traffic. Contains basic traffic information about an API's usage and details about which proxy it was processed through                                                                                                       |
| [Trace](/en/develop/monitoring-analysis/step-by-step-tracing)                                                               | `log_apiproxytraffic_policy_execution` | Structure containing information about policy application processes when Trace is enabled in API Proxy traffic. Represents information about the state before and after policy(ies) are applied                                                                                                                        |
| [Trace](/en/develop/monitoring-analysis/step-by-step-tracing)                                                               | `log_apiproxytraffic_routing`          | Structure representing events such as routing, retry, and failover when Trace is enabled in API Proxy traffic. Keeps information about which routes an API request passed through, how retry or failover processes worked in case of any error                                                                         |
| -                                                                                                                           | `user_token_blackList`                 | Collection where each login operation is kept as a separate record when users log in multiple times                                                                                                                                                                                                                    |
| [Notifications](/en/integrations/connectors/notification-connector)                                                         | `notification_user`                    | Collection where user notifications are kept                                                                                                                                                                                                                                                                           |
| [TCP Connectivity Test History](/en/operations/database-growth-management/tcp-connectivity-test-history-collection-cleanup) | `tcp_connectivity_test_history`        | Collection where TCP connectivity test results are stored                                                                                                                                                                                                                                                              |
| [API Manager Login Logs](/en/operations/database-growth-management/persistent-audit-event-collection-cleanup)               | `persistent_audit_event`               | Collection where API Manager login attempt records are stored                                                                                                                                                                                                                                                          |
| [API Portal Login Logs](/en/operations/database-growth-management/portal-login-logs-collection-cleanup)                     | `portal_login_logs`                    | Collection where API Portal login attempt records are stored                                                                                                                                                                                                                                                           |
|                                                                                                                             |                                        |                                                                                                                                                                                                                                                                                                                        |

<Warning>
  Some collections contain critical data. Especially cleaning `audit_event`, `history_acl`, `persistent_audit_event`, and `portal_login_logs` collections is not recommended. Automatic purge via Purge Jobs has been removed for audit and login log collections. Before interfering with these collections, backup should be taken and careful evaluation should be made.
</Warning>
