The DDL commands on this page use Apinizer’s default table names (
log_ApiProxyTraffic, log_PolicyCapture, log_AuditEvent, log_Application, log_UnsentMessage, log_TokenTraffic, log_LoginLog) and no schema prefix.If you prefer a custom schema or custom table names, configure them in the Log Target Usage — Table Schema section of the connection definition. You can rename the table or add a schema prefix in your DDL, but column names and data types must match exactly — otherwise log inserts will fail with column-not-found errors.Especially on Oracle, if you use case-sensitive table names (e.g. CREATE TABLE "HR"."logtablosu"), you must enter the table name inside double quotes in the connection definition.See Database Connection for details.Column names are identical across all database types (snake_case). Only the data types differ per database.
API Proxy Traffic Log
The main table where all HTTP traffic passing through API Proxy is recorded.- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
| Column | Description |
|---|---|
| id | Record identifier |
| log_timestamp | Time the log record was created |
| correlation_id | Request-specific correlation ID; links records in the same request chain |
| environment_id | Identifier of the environment where the request was processed |
| project_id | Identifier of the project the API belongs to |
| application_id | Identifier of the application making the request |
| application_name | Name of the application making the request |
| api_proxy_id | Identifier of the API Proxy used for the request |
| api_proxy_name | Name of the API Proxy used for the request |
| enum_api_type | API type (REST, SOAP, etc.) |
| proxy_relative_path | Relative path of the API Proxy |
| proxy_method_id | Identifier of the matched method |
| proxy_method_name | Name of the matched method |
| x_forwarded_for | Real client IP address (proxy/load balancer chain) |
| username_or_key | Username or API key used for authentication |
| req_context_path | Request context path |
| req_remote_addr | Remote address of the request |
| req_http_method | HTTP method (GET, POST, PUT, etc.) |
| req_content_type | Content type of the request |
| req_path_info | Request path info |
| req_query_string | Request query string |
| req_remote_user | Remote user |
| req_session_id | Session identifier |
| req_request_uri | Request URI |
| req_char_encoding | Request character encoding |
| req_content_length | Request content length (bytes) |
| req_protocol | Protocol |
| req_scheme | Scheme (http/https) |
| req_server_name | Server name |
| req_server_port | Server port |
| req_remote_host | Remote host |
| req_remote_port | Remote port |
| req_local_name | Local name |
| req_local_addr | Local address |
| req_local_port | Local port |
| from_client_ro_param | Query parameters from the client (JSON) |
| from_client_ro_header | Headers from the client (JSON) |
| from_client_ro_body | Request body from the client |
| to_backend_param | Query parameters sent to the backend (JSON) |
| to_backend_header | Headers sent to the backend (JSON) |
| to_backend_body | Request body sent to the backend |
| routing_address | Backend address routed to |
| routing_retry_count | Number of retry attempts |
| routing_failover_cnt | Number of failovers |
| from_backend_ro_header | Response headers from the backend (JSON) |
| from_backend_ro_body | Response body from the backend |
| to_client_header | Response headers sent to the client (JSON) |
| to_client_body | Response body sent to the client |
| time_req_pipeline | Request pipeline duration (ms) |
| time_resp_pipeline | Response pipeline duration (ms) |
| time_routing_total | Total routing duration (ms) |
| time_api_proxy_total | Total API Proxy processing duration (ms) |
| size_request_total | Request size (bytes) |
| size_response_total | Response size (bytes) |
| cache_hit | Whether the response was served from cache |
| status_code | HTTP response status code |
| error_type | Error type |
| parent_error_type | Parent error type |
| result_type | Processing result |
| location_lat | Geographic location — latitude |
| location_lon | Geographic location — longitude |
| is_canary_request | Whether this is a canary routing request |
| canary_routing_status | Canary routing status |
| mirror_count | Number of mirror requests |
| mirror_success_count | Number of successful mirror requests |
| mirror_failure_count | Number of failed mirror requests |
| mirror_total_duration | Total mirror request duration (ms) |
| mirror_addresses | Mirror addresses (JSON) |
Recommended Indexes
This is the highest-volume log table. The following indexes cover the most common query patterns (end-to-end tracing, time-range scans, proxy/project filtering, error analysis).- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
Partitioning
This table grows very quickly under production traffic. Daily partitioning onlog_timestamp is strongly recommended so that retention can be applied via DROP PARTITION and time-range queries prune inactive partitions. See Partitioning Syntax for database-specific examples.
Token Traffic Log
The table that records OAuth/JWT token operations.- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
| Column | Description |
|---|---|
| id | Record identifier |
| log_timestamp | Time the log record was created |
| correlation_id | Correlation identifier |
| environment_id | Environment identifier |
| project_id | Project identifier |
| application_id | Application identifier |
| application_name | Application name |
| api_proxy_id | API Proxy identifier |
| api_proxy_name | API Proxy name |
| x_forwarded_for | Real client IP address |
| req_remote_addr | Remote address |
| req_http_method | HTTP method |
| req_content_type | Request content type |
| username_or_key | Username or API key |
| time_total | Total processing duration (ms) |
| status_code | HTTP response status code |
| error_type | Error type |
| parent_error_type | Parent error type |
| result_type | Processing result |
| to_client_header | Response headers sent to the client (JSON) |
| to_client_body | Response body sent to the client |
| auth_token_type | Token type (Bearer, Basic, etc.) |
| audience | Target audience of the token |
| client_info | Client information |
| token_never_expires | Whether the token has no expiry |
| issued_at | Time the token was issued |
| expires_at | Token expiry time |
| expires_in | Token validity duration (seconds) |
| scope | Token scope information |
| refresh_token_allowed | Whether refresh tokens are allowed |
| refresh_token_issued_at | Time the refresh token was issued |
| refresh_token_expires_at | Refresh token expiry time |
| refresh_token_expires_in | Refresh token validity duration (seconds) |
| refresh_count | Number of times refreshed |
| max_refresh_count | Maximum number of refreshes allowed |
Recommended Indexes
Token operations are frequently investigated per user/application and per time window. Correlation joins with the API traffic table are also common when tracing an end-to-end call.- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
Partitioning
Token volumes usually scale with API traffic volumes. Daily partitioning onlog_timestamp is recommended. See Partitioning Syntax.
Policy Capture Log
The table that stores request details recorded in policy capture mode.- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
| Column | Description |
|---|---|
| id | Record identifier |
| log_timestamp | Time the log record was created |
| correlation_id | Correlation identifier |
| environment_id | Environment identifier |
| api_proxy_id | API Proxy identifier |
| api_proxy_name | API Proxy name |
| proxy_method_id | Method identifier |
| proxy_method_name | Method name |
| username_or_key | Username or API key |
| status_code | HTTP response status code |
| result_type | Processing result |
| error_type | Error type |
| from_client_ro_header | Headers from the client (JSON) |
| from_client_ro_param | Query parameters from the client (JSON) |
| from_client_ro_body | Request body from the client |
| capture_region | Pipeline stage where the policy ran: FROM_CLIENT, TO_BACKEND, FROM_BACKEND, TO_CLIENT |
| capture_location | Level at which the policy was defined: API_PROXY_GROUP (Group), API_PROXY (Proxy), API_PROXY_METHOD (Method) |
Recommended Indexes
When the log policy is placed at multiple pipeline stages (for example,FROM_CLIENT and TO_CLIENT), request and response rows share the same correlation_id. The correlation_id index is therefore essential for joining request and response records end to end.
- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
Partitioning
Volume depends on how many log policies are attached to flows and how often they fire. For policies attached at proxy/method scope on high-traffic APIs, daily partitioning onlog_timestamp is recommended. See Partitioning Syntax.
Application Log
The table that stores platform-level application logs.- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
| Column | Description |
|---|---|
| id | Record identifier |
| env_name | Environment name |
| api_proxy_id | API Proxy identifier |
| api_proxy_name | API Proxy name |
| correlation_id | Correlation identifier |
| log_timestamp | Time the log record was created |
| log_level | Log level (INFO, WARN, ERROR, etc.) |
| message | Log message |
| stack_trace | Error stack trace |
| host_name | Name of the server where the log was created |
| enum_application_log | Application log source type |
| total_duration | Total processing duration (ms) |
Recommended Indexes
Application logs are commonly filtered by time range and log level (for troubleshooting), and joined with traffic logs viacorrelation_id to reconstruct a single request’s platform-level events.
- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
Partitioning
Application logs accumulate steadily. Daily partitioning onlog_timestamp is recommended on production systems. See Partitioning Syntax.
Audit Event
The table that stores audit records of user operations.- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
| Column | Description |
|---|---|
| id | Record identifier |
| audit_event_date | Time the audit event occurred |
| principal | User who performed the action |
| state | State of the action (CREATE, UPDATE, DELETE, etc.) |
| object_id | Identifier of the object acted upon |
| object_name | Name of the object acted upon |
| ref_object_json | JSON representation of the object acted upon |
| project_id | Project identifier |
| class_name | Type of the object |
Recommended Indexes
Audit queries most often filter by date range, user (principal), affected object type, or project. The partition key here isaudit_event_date, not log_timestamp.
- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
Partitioning
Audit events are generated by user actions (far fewer than traffic rows) and are usually retained for longer periods for compliance. Monthly partitioning onaudit_event_date is typically sufficient. See Partitioning Syntax and substitute MONTH for DAY in the interval.
Login Log
The table that stores login attempts to the API Manager and API Portal (success and failure events).- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
| Column | Description |
|---|---|
| id | Record identifier |
| log_timestamp | Time the login event occurred |
| source | Login source (API_MANAGER, API_PORTAL) |
| principal | User principal (API Manager login) |
| User email (API Portal login) | |
| display_name | User display name |
| event_type | Event type (LOGIN_SUCCESS, LOGIN_FAILURE) |
| remote_address | Remote client IP address |
| message | Result message or failure reason |
| error_type | Error class (for failures) |
| portal_id | Portal identifier (for portal logins) |
| account_id | Account identifier (for portal logins) |
Recommended Indexes
Login logs are queried by time range, user (email/principal), login source, and event type (for security auditing and locked-account investigation).- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
Partitioning
Login log volume is typically low compared to traffic logs. Monthly partitioning onlog_timestamp is sufficient for long retention periods commonly required for security audit. See Partitioning Syntax and substitute MONTH for DAY in the interval.
Unsent Message
The table that temporarily stores log records that could not be delivered due to connection errors.- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
| Column | Description |
|---|---|
| id | Record identifier |
| log_timestamp | Time the record was created |
| connector_id | Identifier of the connector the data failed to be sent to |
| content | Content of the unsent log record (JSON) |
Recommended Indexes
Rows in this table are transient: they are inserted when a connector is unreachable and removed when delivery succeeds. A small number of indexes is sufficient for resend lookups and cleanup.- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
Partitioning
This table holds transient records that are normally consumed within a short time window. Partitioning is not required. If the table grows unexpectedly (prolonged outages), operational cleanup is a better remedy than partitioning.Partitioning Syntax
The examples below show daily partitioning onlog_timestamp. Substitute the actual table name and adjust the initial boundary date to suit your deployment. For the log_AuditEvent table, replace log_timestamp with audit_event_date and use a monthly interval instead.
- Oracle
- MySQL/MariaDB
- PostgreSQL
- SQL Server
Data Type Mapping Table
The following table shows the data type mappings between different databases.| Usage | Oracle | MySQL/MariaDB | PostgreSQL | SQL Server |
|---|---|---|---|---|
| Short text | VARCHAR2(255) | VARCHAR(255) | VARCHAR(255) | NVARCHAR(255) |
| Long text | CLOB | TEXT / LONGTEXT | TEXT | NVARCHAR(MAX) |
| Integer | NUMBER(10) | INT | INTEGER | INT |
| Big integer | NUMBER(19) | BIGINT | BIGINT | BIGINT |
| Decimal | NUMBER | DOUBLE | DOUBLE PRECISION | FLOAT |
| Boolean | NUMBER(1) | TINYINT(1) | BOOLEAN | BIT |
| Timestamp | TIMESTAMP | TIMESTAMP NULL | TIMESTAMP | DATETIME2 |

