databaseConnections

Update a Database Connection

Changed on

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.

patch/lib/database-connections/{id}

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    • HTTP bearer
    • or OAuth 2
      Client credentials
      Token URL: https://login.cribl.cloud/oauth/token

Path parameters

idstring required

The <code>id</code> of the Database Connection to update.

Request body

accountIdentifierstring

Snowflake account identifier in org-account format (example: MYORG-MYACCOUNT).

authType'configObj' | 'connectionString' | 'keypair' | 'secret' | 'secrets' required
configObjstring

JSON configuration object for advanced SQL Server connection settings.

connectionStringstring

Database connection string with embedded credentials or server information.

connectionTimeoutinteger

Maximum time (in milliseconds) to wait when establishing the database connection.

credentialsSecretstring

Name of the stored credentials secret containing username and password for SQL Server configObj authentication.

credsSecretsstring

Name of the stored credentials secret containing username and password. Used with Oracle connections.

databasestring

Database to connect to instead of the server default.

databaseType'mysql' | 'oracle' | 'postgres' | 'snowflake' | 'sqlserver' | 'teradata' required
descriptionstring required

Brief description of the Database Connection.

hoststring

Hostname of the server to connect to.

idstring required

Unique identifier for the Database Connection.

logOnMechanismstring

Log On Mechanism for databases that support multiple, like Teradata.

passwordstring

Database password for authentication. Used with Oracle connections.

requestTimeoutinteger

Maximum time (in milliseconds) to wait for a database query to complete. Applies to SQL Server connections only.

rolestring

Snowflake role to use for the session. When set, requests a role-scoped token.

sslmodestring

HTTPS/TLS connection mode for Teradata. Controls certificate verification behavior.

tagsstring

Comma-separated list of tags for categorizing and filtering Database Connections.

textSecretstring

Name of the stored text secret containing the connection string.

userstring

Database username for authentication. Used with Oracle connections.

warehousestring

Snowflake warehouse to use for queries.

Example request

{
  "connectionString": "mysql://yourUsername:yourPassword@mysql.example.com:3306/production?ssl=true",
  "connectionTimeout": 10000,
  "credentialsSecret": "mssql-production-credentials",
  "credsSecrets": "oracle-production-credentials",
  "description": "Production MySQL database for customer data",
  "host": "'myId-dt5egqq7iq1hj6kh.env.trial.example.com'\nHostname, currently intended for Teradata",
  "id": "mysql-prod-db",
  "password": "yourPassword",
  "requestTimeout": 30000,
  "sslmode": "VERIFY-FULL",
  "tags": "production,mysql,customer-data",
  "textSecret": "mysql-production-connection",
  "user": "yourUsername"
}

Response

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

countinteger required

Number of Database Connections returned in the response envelope.

Example response

{
  "count": 1,
  "items": [
    {
      "connectionString": "mysql://yourUsername:yourPassword@mysql.example.com:3306/production?ssl=true",
      "connectionTimeout": 10000,
      "credentialsSecret": "mssql-production-credentials",
      "credsSecrets": "oracle-production-credentials",
      "description": "Production MySQL database for customer data",
      "host": "'myId-dt5egqq7iq1hj6kh.env.trial.example.com'\nHostname, currently intended for Teradata",
      "id": "mysql-prod-db",
      "password": "yourPassword",
      "requestTimeout": 30000,
      "sslmode": "VERIFY-FULL",
      "tags": "production,mysql,customer-data",
      "textSecret": "mysql-production-connection",
      "user": "yourUsername"
    }
  ]
}

Changes

    • warning

      added the new keypair enum value to the // response property for the response status

    • warning

      added the new snowflake enum value to the // response property for the response status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new keypair enum value to the request property

    • info

      added the new snowflake enum value to the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • warning

      added the new teradata enum value to the // response property for the response status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new teradata enum value to the request property

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status