Connections

Create connection

Changed on

Creates a new database connection. See the Parameters

post/v1/connections

Request

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

Request body

dialect'athena' | 'bigquery' | 'clickhouse' | 'databricks' | 'databricks_lakebase' | 'exasol' | 'mariadb' | 'motherduck' | 'mssql' | 'mysql' | 'oracle' | 'postgres' | 'redshift' | 'sap_hana' | 'snowflake' | 'starrocks' | 'trino' required

The database dialect.

namestring required

A descriptive name for the connection

hoststring

The hostname or IP address of the database server.

  • MotherDuck - Not required
  • Snowflake - Provide only the account identifier (e.g., myaccount not myaccount.snowflakecomputing.com)
  • BigQuery - Automatically determined from the service account
portinteger

The port number for the database connection.

Not required for Snowflake, MotherDuck, BigQuery, Databricks, and Athena.

databasestring

The default database/catalog to connect to.

  • BigQuery - Provide the project ID
  • Athena - Provide the data catalog
usernamestring

The username to authenticate with.

  • MotherDuck - Not required
  • BigQuery - Provide client email from the service account
passwordUnencryptedstring

Required for all dialects except BigQuery, Snowflake, and Athena. The password to authenticate with. Must not be blank, except for Trino, where a blank value is allowed.

  • BigQuery - This must be the JSON service account key file content
  • Snowflake with keypair authentication - Can be omitted
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
warehousestring

Required for:

  • Snowflake - Specify the warehouse
  • Databricks - Specify the HTTP path
includeSchemasstring[]

Schemas to include. Omit this field or send an empty array to include all schemas.

includeOtherCatalogsstring[]

Other catalogs/databases to include.

Only applicable for databases that support multi-catalog queries: BigQuery, Snowflake, MotherDuck, Databricks, Trino, Athena.

defaultSchemastring

Required for MSSQL. The default schema to use.

queryTimeoutSecondsinteger

The timeout in seconds for queries. Maximum value is 3600 (1 hour). Only applicable for databases that support query timeouts.

regionstring

Required for BigQuery and Athena connections.

  • BigQuery - Specify a region like us
  • Athena - Specify an AWS region like us-east-1
maxBillingBytesinteger

Applicable for BigQuery. Maximum bytes that can be billed for a BigQuery query.

scratchSchemastring

Schema to use for data input (upload) tables. If not specified, a suitable default will be chosen.

systemTimezonestring

The timezone to use for the system.

queryTimezonestring

The timezone to use for queries.

allowsUserSpecificTimezonesboolean

Whether to allow users to specify their own timezones.

alwaysScopeViewNamesboolean

Whether to prefix generated view names with their schema and catalog, e.g. my_catalog_public__orders instead of orders. Defaults to true for dialects that support multiple catalogs, and false otherwise. See View name generation for more information.

trustServerCertificateboolean

Applicable for MSSQL, Exasol, and ClickHouse. Whether to trust the server certificate.

privateKeystring

Applicable for Snowflake only. An unencrypted RSA key for keypair authentication, in PKCS#8 or PKCS#1 PEM format. Omni converts a PKCS#1 key to PKCS#8, and automatically adds PKCS#8 PEM headers if none are provided.

acceptsLicenseboolean

Applicable for Oracle. Whether to accept the license terms.

authenticationTypestring

Applicable for BigQuery, MSSQL, Snowflake, Databricks, and Athena. The authentication method to use.

awsRoleArnstring

Applicable for Athena. The AWS role ARN to assume for the connection.

enableDbSemanticLayerIntegrationboolean

Whether to enable the database's semantic layer integration:

  • Snowflake - Snowflake semantic views
  • Databricks - Databricks Unity Catalog
enableDbSemanticLayerTopicsboolean

Applicable for Snowflake and Databricks. Whether to enable database semantic layer topics.

externalOauthAudiencestring

Applicable for Snowflake. The audience for external OAuth authentication.

externalOauthAuthorizationUrlstring

Applicable for Snowflake. The authorization URL for external OAuth authentication.

externalOauthTokenUrlstring

Applicable for Snowflake. The token URL for external OAuth authentication.

hostOverridestring

Applicable for Snowflake. Override for the host value.

accountIdentifierstring

Applicable for Snowflake. The Snowflake account identifier. Optional when used with hostOverride and port. Snowflake can usually infer the account identifier from the hostname, so this is only needed for key-pair authentication through a proxy, tunnel, or PrivateLink where the hostname doesn't identify the account.

inferRelationshipsFromColumnNamesboolean

Whether to automatically infer relationships from column-name conventions during schema refresh.

inferRelationshipsFromForeignKeysboolean

Applicable for Postgres and Snowflake. Whether to automatically infer relationships from foreign key constraints.

oauthClientIdstring

Applicable for Snowflake and Databricks. The OAuth client ID for native OAuth.

oauthClientSecretUnencryptedstring

Applicable for Snowflake and Databricks. The unencrypted OAuth client secret for native OAuth.

offloadedSchemasstring[]

Applicable for all dialects. Schemas to offload. See Offloading schemas for more information.

useMachineAuthboolean

Applicable for Athena and Databricks. Whether to use machine authentication.

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. When you test the connection, Omni shows a warning, without failing, if it can't verify that the session is read-only.

Response

Connection created successfully

successboolean
datastring uuid

Connection ID

Changes

    • breaking

      the request property type changed from string to array

    • breaking

      the request property type changed from string to array

    • breaking

      the request property type changed from string to integer

    • breaking

      the request property type changed from string to array

    • warning

      the request property's max was set to 9007199254740991.00

    • warning

      the request property's min was set to 0.00

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property became optional