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

# Get a Database Connection

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

Get the specified Database Connection.

## Path parameters

- `id` string, required

## Response `200`

The requested 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

- `401` — Authentication failed (missing or invalid credentials or Bearer token).
- `404` — The requested resource does not exist — 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)
