Connections

Update connection

Changed on

Update connection properties including credentials. Credentials are encrypted at rest and never returned in API responses.

This endpoint supports credential rotation for infrastructure-as-code workflows. Depending on the connection type, you can update:

  • Password-based connections (Postgres, MySQL, etc.): Use passwordUnencrypted to update the password
  • BigQuery: Use passwordUnencrypted to update the service account JSON
  • Snowflake: Use privateKey to update the RSA private key (PKCS#8 or PKCS#1 PEM format, minimum 2048 bits). Omni converts a PKCS#1 key to PKCS#8.

At least one field must be provided in the request body.

patch/v1/connections/{connectionId}

Request

  • Base URL
    https://blobsrus.omniapp.co/api
  • URL
    https://blobsrus.omniapp.co/api/v1/connections/{connectionId}
  • Auth
    HTTP bearer

Path parameters

connectionIdstring uuid required

Connection ID

Request body

passwordUnencryptedstring

Password or service account JSON for credential rotation.

  • For password-based connections such as Postgres, MySQL, etc. - Provide the new password as a string
  • For BigQuery - Provide the entire service account JSON file as a string
privateKeystring

Only applicable to Snowflake connections. Unencrypted RSA private key for Snowflake connections, in PKCS#8 or PKCS#1 PEM format. Must be at least 2048 bits. Omni converts a PKCS#1 key to PKCS#8.

baseRolestring

The default role for users accessing the connection. Available roles include:

  • VIEWER - Can view the model
  • QUERIER - Can view and query the model
  • QUERY_TOPICS - Can query specific topics. Equivalent to Restricted Querier.
  • MODELER - Can edit and model the data
  • CONNECTION_ADMIN - Full administrative access to the connection
  • NO_ACCESS - No access to the model
  • Custom roles defined for your organization
useReadScalingboolean

Applicable for MSSQL only. Whether to request read-only routing (ApplicationIntent=ReadOnly) for the connection, so read queries can run on a readable secondary.

SQL Server uses the primary when no readable secondary is available. Omni's own upload writes always use the primary, even when this setting is on.

Example request

{
  "passwordUnencrypted": "new-password-here",
  "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBg..."
}

Response

Connection updated successfully

successboolean
messagestring

Example response

{
  "success": true,
  "message": "Updated connection credentials."
}

Changes