---
title: "Update a Database Connection"
method: PATCH
path: "/lib/database-connections/{id}"
tags: ["databaseConnections"]
---

# Update a Database Connection

`PATCH /lib/database-connections/{id}`

Update the specified Database Connection.<br/><br/>Provide a complete representation of the Database Connection that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Database Connection.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Database Connection might not function as expected.

## Path parameters

- `id` string, required

## Request body

- DatabaseConnectionConfig
  - `authType` 'configObj' | 'connectionString' | 'secret' | 'secrets', required
  - `configObj` string — JSON configuration object for advanced SQL Server connection settings.
  - `connectionString` string — Database connection string with embedded credentials or server information.
  - `connectionTimeout` integer — Maximum time (in milliseconds) to wait when establishing the database connection.
  - `credsSecrets` string — Name of the stored credentials secret containing username and password. Used with Oracle connections.
  - `databaseType` 'mysql' | 'oracle' | 'postgres' | 'sqlserver', required
  - `description` string, required — Brief description of the Database Connection.
  - `id` string, required — Unique identifier for the Database Connection.
  - `password` string — Database password for authentication. Used with Oracle connections.
  - `requestTimeout` integer — Maximum time (in milliseconds) to wait for a database query to complete. Applies to SQL Server connections only.
  - `tags` string — Comma-separated list of tags for categorizing and filtering Database Connections.
  - `textSecret` string — Name of the stored text secret containing the connection string.
  - `tls` TLSClientParams — TLS client connection settings.
    - `caPath` string — Path to the Certificate Authority (CA) certificate file in PEM format.
    - `certPath` string — Path to the client certificate file in PEM format.
    - `certificateName` string — Name of a certificate stored in Cribl.
    - `disabled` boolean, required — If <code>true</code>, TLS is disabled for the connection.
    - `maxVersion` 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'
    - `minVersion` 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'
    - `passphrase` string — Passphrase for the private key.
    - `privKeyPath` string — Path to the private key file in PEM format.
    - `rejectUnauthorized` boolean — If <code>true</code>, reject connections to servers with unverified TLS certificates.
    - `servername` string — Server name for TLS Server Name Indication (SNI) extension.
  - `user` string — Database username for authentication. Used with Oracle connections.

## Response `200`

The updated Database Connection in a response envelope with <code>count</code> and <code>items</code>.

- DatabaseConnectionResponseEnvelope
  - `count` integer, required — Number of Database Connections returned in the response envelope.
  - `items` DatabaseConnectionConfig[], required — Database Connections returned in the response envelope.
    - `authType` 'configObj' | 'connectionString' | 'secret' | 'secrets', required
    - `configObj` string — JSON configuration object for advanced SQL Server connection settings.
    - `connectionString` string — Database connection string with embedded credentials or server information.
    - `connectionTimeout` integer — Maximum time (in milliseconds) to wait when establishing the database connection.
    - `credsSecrets` string — Name of the stored credentials secret containing username and password. Used with Oracle connections.
    - `databaseType` 'mysql' | 'oracle' | 'postgres' | 'sqlserver', required
    - `description` string, required — Brief description of the Database Connection.
    - `id` string, required — Unique identifier for the Database Connection.
    - `password` string — Database password for authentication. Used with Oracle connections.
    - `requestTimeout` integer — Maximum time (in milliseconds) to wait for a database query to complete. Applies to SQL Server connections only.
    - `tags` string — Comma-separated list of tags for categorizing and filtering Database Connections.
    - `textSecret` string — Name of the stored text secret containing the connection string.
    - `tls` TLSClientParams — TLS client connection settings.
      - `caPath` string — Path to the Certificate Authority (CA) certificate file in PEM format.
      - `certPath` string — Path to the client certificate file in PEM format.
      - `certificateName` string — Name of a certificate stored in Cribl.
      - `disabled` boolean, required — If <code>true</code>, TLS is disabled for the connection.
      - `maxVersion` 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'
      - `minVersion` 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'
      - `passphrase` string — Passphrase for the private key.
      - `privKeyPath` string — Path to the private key file in PEM format.
      - `rejectUnauthorized` boolean — If <code>true</code>, reject connections to servers with unverified TLS certificates.
      - `servername` string — Server name for TLS Server Name Indication (SNI) extension.
    - `user` string — Database username for authentication. Used with Oracle connections.

## Other responses

- `400` — Failed validation or malformed input, such as missing or invalid parameters.
- `401` — Authentication failed (missing or invalid credentials or Bearer token).
- `404` — Database Connection not found.
- `500` — Unexpected server error.

---

[API](https://skmtc.net/criblio/apis/cribl-api-reference.md) · [All operations](https://skmtc.net/criblio/apis/cribl-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/criblio/cribl-api-reference/versions/e9bef570d106/schema)
