General Information
Connection Type
UI Documentation
Endpoints
List Connections
Get Connection
Create Connection
Update Connection
Delete Connection
List Connections
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
type query parameter is required to filter connections by type.
cURL Example
Get Connection
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| connectionName | string | Yes | Connection name |
Response
Success Response (200 OK)
cURL Example
Create Connection
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| connectionName | string | Yes | Connection name |
Request Body
Full JSON Body Example - Basic Logback Connection
Full JSON Body Example - Custom Pattern
Full JSON Body Example - Unbounded Retention
Request Body Fields
Common Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Connection type discriminator field. Identifies the connection type in API requests/responses. |
| name | string | Yes | - | Connection name (must match path parameter) |
| description | string | No | - | Connection description |
| deployToWorker | boolean | No | true | Whether to deploy to worker |
| enabled | boolean | No | true | Whether connection is enabled |
Logback-Specific Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| logPath | string | Yes | /path/to/logs/ | Directory path where log files will be written (must end with /) |
| logFileName | string | Yes | ApinizerApiProxyTraffic | Base name for log files |
| logPodName | string | Yes | "" | Pod/host identifier (auto-filled with hostname if empty) |
| logFilenamePattern | string | Yes | %d{yyyy-MM-dd}.%i.log | Pattern for rolled log file names (date and index pattern) |
| logPattern | string | Yes | %d{yyyy-MM-dd HH:mm:ss.SSS}[%m]%n | Log message format pattern |
| maxFileSize | integer | Yes | 25 | Maximum size of a single log file in MB (before rolling) |
| maxHistory | integer | Yes | 0 | Maximum number of days/hours to keep rolled log files (0 = unbounded) |
| totalSizeCap | integer | Yes | 0 | Maximum total size of all log files in GB (0 = unbounded) |
Log Pattern Format
%d{pattern}- Date/time with pattern (e.g.,yyyy-MM-dd HH:mm:ss.SSS)%m- Message content%n- Newline%thread- Thread name%level- Log level%logger{length}- Logger name (with optional length)%msg- Message- See Logback PatternLayout documentation for full pattern syntax
Filename Pattern Format
%d{pattern}- Date pattern for rolled files (e.g.,yyyy-MM-dd)%i- Index number for files rolled on the same day- Example:
%d{yyyy-MM-dd}.%i.logcreates files like2024-01-15.0.log,2024-01-15.1.log
Notes
logPathis required and should end with/(automatically added if missing).logFileNameis required and should not start with/(automatically removed if present).logPodNameis auto-filled with hostname if empty or not provided.logFilenamePatternuses Logback date pattern syntax.logPatternuses Logback PatternLayout syntax.maxFileSizeis in MB (default: 25 MB).maxHistoryis in days/hours (0 = unbounded, keep all files).totalSizeCapis in GB (0 = unbounded, no size limit).- File rolling occurs when
maxFileSizeis reached or time-based pattern triggers. - Final log file name format:
{logPath}{logFileName}-{logPodName}-{logFilenamePattern}
Response
Success Response (200 OK)
cURL Example
Update Connection
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| connectionName | string | Yes | Connection name (must match name in body) |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
Delete Connection
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| connectionName | string | Yes | Connection name |
Response
Success Response (200 OK)
Notes and Warnings
-
Log Path:
logPathmust be a valid directory path- Path should end with
/(automatically added if missing) - Ensure the directory exists and is writable by the application
- Use absolute paths for clarity
-
File Naming:
- Final log file name:
{logPath}{logFileName}-{logPodName}-{logFilenamePattern} - Example:
/var/log/apinizer/ApinizerApiProxyTraffic-worker-1-2024-01-15.0.log logPodNameis auto-filled with hostname if empty
- Final log file name:
-
File Rolling:
- Files roll when
maxFileSizeis reached or time-based pattern triggers - Rolled files use index numbers (
.0.log,.1.log, etc.) - Date pattern in
logFilenamePatterndetermines time-based rolling
- Files roll when
-
Retention Policy:
maxHistory- Maximum number of days/hours to keep rolled files (0 = unbounded)totalSizeCap- Maximum total size of all log files in GB (0 = unbounded)- Set both to 0 for unbounded retention (not recommended for production)
-
File Size:
maxFileSizeis in MB (default: 25 MB)- Larger files reduce number of files but increase processing time
- Smaller files create more files but are easier to manage
-
Log Pattern:
- Uses Logback PatternLayout syntax
- Common patterns:
%d{yyyy-MM-dd HH:mm:ss.SSS}[%m]%n(date + message) - See Logback documentation for full pattern syntax
-
Performance:
- File I/O can impact performance
- Use appropriate
maxFileSizeto balance performance and file management - Consider disk I/O capacity when setting retention policies
-
Disk Space:
- Monitor disk space usage
- Set
totalSizeCapto prevent disk space exhaustion - Use
maxHistoryto automatically clean up old files
-
Permissions:
- Ensure application has write permissions to
logPath - Directory must exist before logging starts
- Consider using dedicated log directories
- Ensure application has write permissions to
-
Deployment: Connection changes require deployment to take effect. Set
deployToWorker: trueor deploy manually.
Related Documentation
- List Connections - List all connections
- Get Connection - Get a specific connection
- Create Connection - General connection creation guide
- Update Connection - General connection update guide
- Delete Connection - General connection deletion guide

