Managing Database Growth
Cleaning software log records generated during API Proxy message flows
Cleaning the collection where changes made by users on the system are recorded
Cleaning the collection where API Proxy and API Proxy Group access permissions are recorded
Cleaning the collection where alert operations are recorded
Cleaning message records for incoming and outgoing token requests
Cleaning records kept for anomaly detection in API traffic
Cleaning log records for Uptime Monitoring operation results
Cleaning log records for actions in Integration Task Flow steps
Cleaning software log records generated during report definition execution
Cleaning detailed API traffic records generated when Trace is enabled
Cleaning records kept when users log in multiple times
Cleaning records where user notifications are kept
Cleaning TCP connectivity test result records
Cleaning API Manager login attempt records
Cleaning API Portal login attempt records
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 | apinizer_log | Records for software logs generated during the execution of the flow for incoming and outgoing messages to API Proxy |
| 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 | history_acl | Collection where consumer 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 |
| Security Events | log_apisecurityevent | Bodyless metadata record of every Gateway request blocked by a policy or failed with an error, across HTTP, gRPC and WebSocket traffic |
| Security Events | log_apiaccess | Bodyless metadata record of every request that reaches the Gateway, successful ones included. Written only while API Access local storage is enabled; grows with traffic volume |
| Alert | 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 | log_tokentraffic | Records for relevant parts of incoming and outgoing messages for token requests |
| Anomaly Detector | anomaly_detector_result | Records kept to find anomalies in API traffic |
| Uptime Monitor | uptime_monitor_result | Log records for Uptime Monitoring operation results |
| Task Flow | taskflow_execution_log | Records for logs generated during the execution of actions in Integration Task Flow steps |
| Report Generator | report_configuration_result | Records for software logs generated during report definition execution |
| Trace | 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 | 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 | 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 | notification_user | Collection where user notifications are kept |
| TCP Connectivity Test History | tcp_connectivity_test_history | Collection where TCP connectivity test results are stored |
| API Manager Login Logs | persistent_audit_event | Collection where API Manager login attempt records are stored |
| API Portal Login Logs | portal_login_logs | Collection where API Portal login attempt records are stored |
| Quota Usage and Alerts | quota_alert_notification_log | Quota alarm notifications sent when a quota threshold was reached, with the alert definition that triggered and the send time |
| Quota Usage and Alerts | quota_usage_window_history | Quota usage windows archived after each quota window closes |
| - | environment_metric | Environment (Namespace) metrics |
| - | llm_health_history | Results of periodic health checks against LLM providers (status and latency) |
| - | mcp_health_history | Results of periodic health checks against MCP servers (status and latency) |
| - | ai_trace | AI Gateway trace records captured according to the trace mode. They also expire on their own (24 hours, 7 days or 30 days) |
| - | ai_a2a_task | Agent-to-Agent (A2A) task records. Completed tasks also expire on their own |
| - | ai_token_usage_daily | Daily aggregated AI token usage, used for billing and reporting |
| Identity Synchronization History | identity_sync_run_history, identity_sync_run_issue | Durable record of identity provider synchronization runs and their per-item issue rows |
| - | bulk_limit_assignment_run, bulk_limit_assignment_issue | Durable record of bulk limit assignment runs and their per-consumer issue rows |
| - | lifecycle_purge_run, lifecycle_purge_issue | Durable record of purge and erasure runs and their per-item issue rows |
| - | lifecycle_evidence | Collection that records, for consumers, consumer organizations and portal applications, whether certain lifecycle boundaries have ever been crossed (activated, deployed, exported, and similar). It holds one very small document per record, each entry is written only once and is never updated afterwards |
Some collections contain critical data. Especially cleaning audit_event, history_acl, persistent_audit_event, and portal_login_logs collections is not recommended. history_acl cannot be purged automatically at all. For audit_event (Audit Records), persistent_audit_event (Login Records) and portal_login_logs (Portal Login Logs), automatic purge is available through Application Log Cleanup Tasks but is off by default. Before interfering with these collections, backup should be taken and careful evaluation should be made.
The lifecycle_evidence collection must not be purged or cleaned. It has no cleanup script and no automatic purge, and it is deliberately excluded from time-based cleanup: its records are used to decide whether a record may be deleted, and a missing entry is treated as "no evidence". Deleting these records does not free up meaningful space; it only causes deletion decisions to be made on incomplete information.