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 Configuration
Full JSON Body Example - With Authentication
Full JSON Body Example - With Encryption (PKCS12)
Full JSON Body Example - With Encryption (PEM)
Full JSON Body Example - With Index Lifecycle Policy and Template
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 |
Elasticsearch-Specific Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| administrate | boolean | No | false | Whether to administrate Elasticsearch (create/delete indices, templates, policies) |
| elasticHostList | array | Yes | - | List of Elasticsearch hosts. See ElasticHost |
| authenticate | boolean | No | false | Enable authentication |
| elasticUsername | string | No* | null | Elasticsearch username (required if authenticate=true) |
| elasticPassword | string | No* | null | Elasticsearch password (required if authenticate=true, secret field) |
| encryptCommunication | boolean | No | false | Enable encrypted communication (HTTPS) |
| encryptCommunicationType | string | No* | null | Encryption communication type (required if encryptCommunication=true). See EnumEncryptCommunicationType |
| caCertInPkcs12File | string | No* | null | CA certificate in PKCS12 format (base64-encoded, required if encryptCommunicationType=CA_CERTIFICATE_IN_PKCS_12) |
| caCertInPkcs12FileContentType | string | No | application/x-pkcs12 | Content type for PKCS12 file |
| caInPemFile | string | No* | null | CA certificate in PEM format (base64-encoded, required if encryptCommunicationType=CA_IN_PEM_FILE) |
| caInPemFileContentType | string | No | application/x-pem-file | Content type for PEM file |
| caTruststoreFile | string | No* | null | CA truststore file (base64-encoded, used with PKCS12) |
| caTruststoreFileContentType | string | No | application/x-pkcs12 | Content type for truststore file |
| caTruststoreFilePass | string | No | null | Truststore file password (secret field) |
| caKeystoreFile | string | No* | null | CA keystore file (base64-encoded, required if encryptCommunicationType=CERT_AND_PRIVATE_KEY_IN_PKCS_12) |
| caKeystoreFileContentType | string | No | application/x-pkcs12 | Content type for keystore file |
| caKeystoreFilePass | string | No* | null | Keystore file password (required if caKeystoreFile is provided, secret field) |
| disableHostnameVerification | boolean | No | false | Disable hostname verification (not recommended for production) |
| indexLifecyclePolicyCreated | boolean | No | false | Whether to create index lifecycle policy |
| indexLifecyclePolicy | object | No* | null | Index lifecycle policy configuration (required if indexLifecyclePolicyCreated=true). See ElasticsearchIndexLifecyclePolicy |
| indexTemplateCreated | boolean | No | false | Whether to create index template |
| indexTemplateName | string | No* | null | Index template name (required if indexTemplateCreated=true) |
| indexName | string | No | null | Index name pattern |
| indexTemplateNumberOfShards | integer | No | null | Number of shards for index template |
| indexTemplateNumberOfReplicas | integer | No | null | Number of replicas for index template |
| indexTemplateRefreshInterval | string | No | null | Refresh interval for index template (e.g., “1s”, “5s”) |
| connectionTimeoutInMs | integer | No | null | Connection timeout in milliseconds |
| socketReuseAddress | boolean | No | null | Reuse socket address |
| socketKeepAlive | boolean | No | null | Keep socket alive |
| ioThreads | integer | No | null | Number of IO threads |
| maxConnectionPerHost | integer | No | null | Maximum connections per host |
| maxConnectionTotal | integer | No | null | Maximum total connections |
| type | string | No | READ_WRITE | Elasticsearch connection type. See EnumElasticsearchType |
EnumEncryptCommunicationType
CA_CERTIFICATE_IN_PKCS_12- CA certificate is available in a PKCS#12 keystoreCA_IN_PEM_FILE- CA certificate is available as a PEM encoded fileCERT_AND_PRIVATE_KEY_IN_PKCS_12- Certificate and a private key that are stored in a PKCS#12 keystore
EnumElasticsearchType
READ_WRITE- Read and write access (can create indices, templates, policies)READ- Read-only access (can only query, cannot create/modify)
Note
elasticHostListmust contain at least one host.- If
authenticate: true, bothelasticUsernameandelasticPasswordare required. - If
encryptCommunication: true,encryptCommunicationTypeis required. - If
encryptCommunicationType: CA_CERTIFICATE_IN_PKCS_12,caCertInPkcs12Fileis required. - If
encryptCommunicationType: CA_IN_PEM_FILE,caInPemFileis required. - If
encryptCommunicationType: CERT_AND_PRIVATE_KEY_IN_PKCS_12,caKeystoreFileandcaKeystoreFilePassare required. - If
indexLifecyclePolicyCreated: true,indexLifecyclePolicyis required. - If
indexTemplateCreated: true,indexTemplateNameis required.
ElasticHost
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| scheme | string | No | http | URL scheme: http or https |
| host | string | Yes | - | Elasticsearch hostname or IP address |
| port | integer | No | 9200 | Elasticsearch port |
elasticHostList.
ElasticsearchIndexLifecyclePolicy
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| policyName | string | No | apinizer-log-ilm-policy-default | Index lifecycle policy name |
| enableHotPhase | boolean | No | false | Enable hot phase |
| maxAgeOfRollover | integer | No | null | Maximum age for rollover (in days) |
| maxIndexSizeOfRollover | integer | No | null | Maximum index size for rollover (in GB) |
| maxDocCountOfRollover | long | No | null | Maximum document count for rollover |
| enableWarmPhase | boolean | No | false | Enable warm phase |
| numberOfReplicasForWarm | integer | No | null | Number of replicas for warm phase |
| maxNumShardsForShrink | integer | No | null | Maximum number of shards for shrink |
| maxNumSegmentsForForceMerge | integer | No | null | Maximum number of segments for force merge |
| enableColdPhase | boolean | No | false | Enable cold phase |
| minAgeOfCold | integer | No | null | Minimum age for cold phase (in days) |
| numberOfReplicasForCold | integer | No | null | Number of replicas for cold phase |
| enableDeletePhase | boolean | No | false | Enable delete phase |
| minAgeOfDelete | integer | No | null | Minimum age for delete phase (in days) |
Note
- Age values are in days.
- Size values are in GB.
- At least one phase must be enabled.
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
-
Elasticsearch Hosts:
- At least one host is required in
elasticHostList - Multiple hosts can be specified for high availability
- Each host must have
scheme(http/https),host, andport
- At least one host is required in
-
Authentication:
- When
authenticate: true, bothelasticUsernameandelasticPasswordare required - Supports basic authentication
- Password is stored securely and masked in responses
- When
-
Encryption:
encryptCommunication: trueenables HTTPS/TLS- Three encryption types supported:
CA_CERTIFICATE_IN_PKCS_12- CA certificate in PKCS12 keystoreCA_IN_PEM_FILE- CA certificate in PEM fileCERT_AND_PRIVATE_KEY_IN_PKCS_12- Certificate and private key in PKCS12 keystore
- Certificate files must be base64-encoded
-
Index Lifecycle Management:
indexLifecyclePolicyCreated: truecreates an ILM policy- Supports hot, warm, cold, and delete phases
- Helps manage index lifecycle automatically
-
Index Templates:
indexTemplateCreated: truecreates an index template- Template defines index settings (shards, replicas, refresh interval)
- Used for automatic index creation
-
Connection Settings:
connectionTimeoutInMs- Connection timeoutsocketReuseAddress,socketKeepAlive- Socket optionsioThreads- Number of IO threadsmaxConnectionPerHost,maxConnectionTotal- Connection pool limits
-
Connection Type:
READ_WRITE- Full access (can create indices, templates, policies)READ- Read-only access (query only)
-
Administration:
administrate: trueallows creating/deleting indices, templates, and policies- Requires appropriate Elasticsearch permissions
- Performance: Connection pooling and timeout settings affect performance. Tune based on workload.
-
Security:
- Use HTTPS in production
- Enable authentication
- Do not disable hostname verification in production
- Store certificates securely
-
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

