---
title: "Create a connection"
method: POST
path: "/v2/connections"
tags: ["Connections"]
---

# Create a connection

`POST /v2/connections`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/connections`
- Auth: HTTP bearer

Create a connection to a cloud data warehouse from Sigma. For additional details, see [Connect to data sources](https://help.sigmacomputing.com/docs/connect-to-data-sources).

  ### Usage notes
  - To sign JWT bearer assertions with a JWK set, pass its **jwkSetId**. Retrieve it by calling the [/v2/jsonWebKeys](https://help.sigmacomputing.com/reference/list-all-json-web-keys) endpoint.

## Request body

- object
  - `details` union, required
    - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails0: Details of the PostgreSQL connection.
      - `type` 'postgres' | 'redshift' | 'alloydb', required
      - `host` string, required
      - `database` string, required
      - `user` string
      - `password` union
        - string
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf0Password1
          - `type` 'plain', required
          - `value` string, required
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf0Password2
          - `secretManagerId` string, required
          - `secretId` string, required
      - `port` number, double
      - `useTls` boolean
      - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf0WriteAccess
        - `writeSchema` string, required
    - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails1: Details of the BigQuery connection.
      - `type` 'bigQuery', required
      - `projectId` string, required
      - `additionalProjectIds` string[]
      - `serviceAccount` union
        - string
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf1ServiceAccount1
          - `secretManagerId` string, required
          - `secretId` string, required
      - `metadataUrl` string: OAuth metadata URL for connection-level OAuth.
      - `clientId` string: Client ID for the OAuth application used by this connection.
      - `clientSecret` union: Client secret for the OAuth application used by this connection. This value is write-only and is not returned by the API.
        - string
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf1ClientSecret1
          - `secretManagerId` string, required
          - `secretId` string, required
      - `scopes` string[]: OAuth scopes to request when users authenticate to this connection.
      - `idpType` union: OAuth provider type. Supported values are adfs, auth0, azuread, okta, ping, snowflake, aws_databricks, azure_databricks, gcp_databricks, and unknown.
        - 'aws_databricks'
        - 'azure_databricks'
        - 'gcp_databricks'
        - 'azuread'
        - 'auth0'
        - 'adfs'
        - 'okta'
        - 'ping'
        - 'snowflake'
        - 'unknown'
      - `usePkce` boolean, nullable: Whether the OAuth flow should require Proof Key for Code Exchange (PKCE). Databricks-hosted OAuth providers require PKCE.
      - `useJwt` boolean, nullable: Whether the OAuth flow should use JWT bearer token authentication instead of a client secret.
      - `jwkSetId` string: Unique identifier of the JWK set whose active key signs the JWT bearer assertions for this connection. Requires `useJwt` to be true.
      - `useOauth` boolean: Whether this BigQuery connection uses OAuth federation.
      - `audience` string: Google workforce identity federation audience used to exchange the OAuth token for a Google access token.
      - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf1WriteAccess
        - `writeProject` string, required
        - `writeDataset` string, required
    - union: Details of the Snowflake connection.
      - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails20: Set up basic authentication for the connection
        - `user` string, required
        - `password` union, required
          - string
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0Password1
            - `type` 'plain', required
            - `value` string, required
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0Password2
            - `secretManagerId` string, required
            - `secretId` string, required
        - `type` 'snowflake', required
        - `server` string
        - `account` string
        - `host` string
        - `warehouse` string
        - `role` string
        - `authType` 'basic-auth' | 'key-pair' | 'oauth'
        - `usePython` boolean
        - `pythonSecrets` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0PythonSecrets
          - `setupUser` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0PythonSecretsSetupUser
            - `username` string, required
            - `password` string, required
            - `role` string
          - `pythonUser` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0PythonSecretsPythonUser
            - `username` string, required
            - `password` string, required
            - `role` string
        - `pythonProperties` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0PythonProperties: Python configuration for this Snowflake connection.
          - `serviceNames` string[]
          - `externalAccessIntegration` string: Name of the Snowflake external access integration to enable for Python.
          - `warehouse` string: Warehouse to use to run Python code.
          - `packages` string: Comma-separated list of Python packages to install.
        - `useSourceSwapPolicy` boolean
        - `sourceSwapPolicyId` string
        - `metadataUrl` string: OAuth metadata URL for connection-level OAuth.
        - `clientId` string: Client ID for the OAuth application used by this connection.
        - `clientSecret` union: Client secret for the OAuth application used by this connection. This value is write-only and is not returned by the API.
          - string
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0ClientSecret1
            - `secretManagerId` string, required
            - `secretId` string, required
        - `scopes` string[]: OAuth scopes to request when users authenticate to this connection.
        - `idpType` union: OAuth provider type. Supported values are adfs, auth0, azuread, okta, ping, snowflake, aws_databricks, azure_databricks, gcp_databricks, and unknown.
          - 'aws_databricks'
          - 'azure_databricks'
          - 'gcp_databricks'
          - 'azuread'
          - 'auth0'
          - 'adfs'
          - 'okta'
          - 'ping'
          - 'snowflake'
          - 'unknown'
        - `usePkce` boolean, nullable: Whether the OAuth flow should require Proof Key for Code Exchange (PKCE). Databricks-hosted OAuth providers require PKCE.
        - `useJwt` boolean, nullable: Whether the OAuth flow should use JWT bearer token authentication instead of a client secret.
        - `jwkSetId` string: Unique identifier of the JWK set whose active key signs the JWT bearer assertions for this connection. Requires `useJwt` to be true.
        - `exportsWarehouse` string: Warehouse to use for export workloads.
        - `writeAccess` union: Specify write access for non-OAuth connections
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0WriteAccess0
            - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `materializationWarehouse` string: Warehouse to use for materialization workloads
            - `useDynamicTables` boolean: Whether to use Snowflake dynamic tables for materialization workloads.
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0WriteAccess1
            - `materializationWarehouse` string: Warehouse to use for materialization workloads
            - `useDynamicTables` boolean: Whether to use Snowflake dynamic tables for materialization workloads.
        - `userAttributes` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0UserAttributes
          - `role` string
          - `warehouse` string
        - `writebackSchemas` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0WritebackSchemasItems[]: Configure write-back for OAuth connections
          - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
          - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemaId` string: Unique identifier of the write-back destination
          - `description` string: Description for the write-back destination.
        - `inputTableAuditLogSchema` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf0InputTableAuditLogSchema: Specify a schema for input table write access logs
          - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
          - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemaId` string: Unique identifier of the writebackSchema
        - `roleSwitching` 'allRoles' | 'disabled': Whether a Snowflake OAuth connection allows users to switch roles when running queries. Only relevant when `useOauth` is true.
      - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails21: Set up key-pair authentication for the connection
        - `user` string, required
        - `privateKey` union, required
          - string
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1PrivateKey1
            - `secretManagerId` string, required
            - `secretId` string, required
        - `privateKeyPassphrase` union
          - string
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1PrivateKeyPassphrase1
            - `secretManagerId` string, required
            - `secretId` string, required
        - `type` 'snowflake', required
        - `server` string
        - `account` string
        - `host` string
        - `warehouse` string
        - `role` string
        - `authType` 'basic-auth' | 'key-pair' | 'oauth'
        - `usePython` boolean
        - `pythonSecrets` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1PythonSecrets
          - `setupUser` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1PythonSecretsSetupUser
            - `username` string, required
            - `password` string, required
            - `role` string
          - `pythonUser` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1PythonSecretsPythonUser
            - `username` string, required
            - `password` string, required
            - `role` string
        - `pythonProperties` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1PythonProperties: Python configuration for this Snowflake connection.
          - `serviceNames` string[]
          - `externalAccessIntegration` string: Name of the Snowflake external access integration to enable for Python.
          - `warehouse` string: Warehouse to use to run Python code.
          - `packages` string: Comma-separated list of Python packages to install.
        - `useSourceSwapPolicy` boolean
        - `sourceSwapPolicyId` string
        - `metadataUrl` string: OAuth metadata URL for connection-level OAuth.
        - `clientId` string: Client ID for the OAuth application used by this connection.
        - `clientSecret` union: Client secret for the OAuth application used by this connection. This value is write-only and is not returned by the API.
          - string
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1ClientSecret1
            - `secretManagerId` string, required
            - `secretId` string, required
        - `scopes` string[]: OAuth scopes to request when users authenticate to this connection.
        - `idpType` union: OAuth provider type. Supported values are adfs, auth0, azuread, okta, ping, snowflake, aws_databricks, azure_databricks, gcp_databricks, and unknown.
          - 'aws_databricks'
          - 'azure_databricks'
          - 'gcp_databricks'
          - 'azuread'
          - 'auth0'
          - 'adfs'
          - 'okta'
          - 'ping'
          - 'snowflake'
          - 'unknown'
        - `usePkce` boolean, nullable: Whether the OAuth flow should require Proof Key for Code Exchange (PKCE). Databricks-hosted OAuth providers require PKCE.
        - `useJwt` boolean, nullable: Whether the OAuth flow should use JWT bearer token authentication instead of a client secret.
        - `jwkSetId` string: Unique identifier of the JWK set whose active key signs the JWT bearer assertions for this connection. Requires `useJwt` to be true.
        - `exportsWarehouse` string: Warehouse to use for export workloads.
        - `writeAccess` union: Specify write access for non-OAuth connections
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1WriteAccess0
            - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `materializationWarehouse` string: Warehouse to use for materialization workloads
            - `useDynamicTables` boolean: Whether to use Snowflake dynamic tables for materialization workloads.
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1WriteAccess1
            - `materializationWarehouse` string: Warehouse to use for materialization workloads
            - `useDynamicTables` boolean: Whether to use Snowflake dynamic tables for materialization workloads.
        - `userAttributes` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1UserAttributes
          - `role` string
          - `warehouse` string
        - `writebackSchemas` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1WritebackSchemasItems[]: Configure write-back for OAuth connections
          - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
          - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemaId` string: Unique identifier of the write-back destination
          - `description` string: Description for the write-back destination.
        - `inputTableAuditLogSchema` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf1InputTableAuditLogSchema: Specify a schema for input table write access logs
          - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
          - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemaId` string: Unique identifier of the writebackSchema
        - `roleSwitching` 'allRoles' | 'disabled': Whether a Snowflake OAuth connection allows users to switch roles when running queries. Only relevant when `useOauth` is true.
      - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails22: Set up OAuth for the connection
        - `useOauth` boolean, required
        - `type` 'snowflake', required
        - `server` string
        - `account` string
        - `host` string
        - `warehouse` string
        - `role` string
        - `authType` 'basic-auth' | 'key-pair' | 'oauth'
        - `usePython` boolean
        - `pythonSecrets` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2PythonSecrets
          - `setupUser` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2PythonSecretsSetupUser
            - `username` string, required
            - `password` string, required
            - `role` string
          - `pythonUser` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2PythonSecretsPythonUser
            - `username` string, required
            - `password` string, required
            - `role` string
        - `pythonProperties` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2PythonProperties: Python configuration for this Snowflake connection.
          - `serviceNames` string[]
          - `externalAccessIntegration` string: Name of the Snowflake external access integration to enable for Python.
          - `warehouse` string: Warehouse to use to run Python code.
          - `packages` string: Comma-separated list of Python packages to install.
        - `useSourceSwapPolicy` boolean
        - `sourceSwapPolicyId` string
        - `metadataUrl` string: OAuth metadata URL for connection-level OAuth.
        - `clientId` string: Client ID for the OAuth application used by this connection.
        - `clientSecret` union: Client secret for the OAuth application used by this connection. This value is write-only and is not returned by the API.
          - string
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2ClientSecret1
            - `secretManagerId` string, required
            - `secretId` string, required
        - `scopes` string[]: OAuth scopes to request when users authenticate to this connection.
        - `idpType` union: OAuth provider type. Supported values are adfs, auth0, azuread, okta, ping, snowflake, aws_databricks, azure_databricks, gcp_databricks, and unknown.
          - 'aws_databricks'
          - 'azure_databricks'
          - 'gcp_databricks'
          - 'azuread'
          - 'auth0'
          - 'adfs'
          - 'okta'
          - 'ping'
          - 'snowflake'
          - 'unknown'
        - `usePkce` boolean, nullable: Whether the OAuth flow should require Proof Key for Code Exchange (PKCE). Databricks-hosted OAuth providers require PKCE.
        - `useJwt` boolean, nullable: Whether the OAuth flow should use JWT bearer token authentication instead of a client secret.
        - `jwkSetId` string: Unique identifier of the JWK set whose active key signs the JWT bearer assertions for this connection. Requires `useJwt` to be true.
        - `exportsWarehouse` string: Warehouse to use for export workloads.
        - `writeAccess` union: Specify write access for non-OAuth connections
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2WriteAccess0
            - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `materializationWarehouse` string: Warehouse to use for materialization workloads
            - `useDynamicTables` boolean: Whether to use Snowflake dynamic tables for materialization workloads.
          - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2WriteAccess1
            - `materializationWarehouse` string: Warehouse to use for materialization workloads
            - `useDynamicTables` boolean: Whether to use Snowflake dynamic tables for materialization workloads.
        - `userAttributes` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2UserAttributes
          - `role` string
          - `warehouse` string
        - `writebackSchemas` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2WritebackSchemasItems[]: Configure write-back for OAuth connections
          - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
          - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemaId` string: Unique identifier of the write-back destination
          - `description` string: Description for the write-back destination.
        - `inputTableAuditLogSchema` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf2OneOf2InputTableAuditLogSchema: Specify a schema for input table write access logs
          - `writeDatabase` string, required: Database or top-level object to contain tables written back to the data platform
          - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemaId` string: Unique identifier of the writebackSchema
        - `roleSwitching` 'allRoles' | 'disabled': Whether a Snowflake OAuth connection allows users to switch roles when running queries. Only relevant when `useOauth` is true.
    - union: Details of the Databricks connection.
      - union
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails300: Set up basic authentication for the connection
          - `token` union, required
            - string
            - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf0Token1
              - …
          - `endpoint` string, required
          - `type` 'databricks', required
          - `host` string, required
          - `workspaceUrl` string
          - `useSourceSwapPolicy` boolean
          - `sourceSwapPolicyId` string
          - `usePython` boolean: Set to `true` to enable Python queries on this Databricks connection. Requires `pythonComputeClusterId`.
          - `metadataUrl` string: OAuth metadata URL for connection-level OAuth.
          - `clientId` string: Client ID for the OAuth application used by this connection.
          - `clientSecret` union: Client secret for the OAuth application used by this connection. This value is write-only and is not returned by the API.
            - string
            - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf0ClientSecret1
              - …
          - `scopes` string[]: OAuth scopes to request when users authenticate to this connection.
          - `idpType` union: OAuth provider type. Supported values are adfs, auth0, azuread, okta, ping, snowflake, aws_databricks, azure_databricks, gcp_databricks, and unknown.
            - 'aws_databricks'
            - 'azure_databricks'
            - 'gcp_databricks'
            - 'azuread'
            - 'auth0'
            - 'adfs'
            - 'okta'
            - 'ping'
            - 'snowflake'
            - 'unknown'
          - `usePkce` boolean, nullable: Whether the OAuth flow should require Proof Key for Code Exchange (PKCE). Databricks-hosted OAuth providers require PKCE.
          - `useJwt` boolean, nullable: Whether the OAuth flow should use JWT bearer token authentication instead of a client secret.
          - `jwkSetId` string: Unique identifier of the JWK set whose active key signs the JWT bearer assertions for this connection. Requires `useJwt` to be true.
          - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf0WriteAccess: Configure write-back for non-OAuth connections
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemas` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf0WritebackSchemasItems[]: Configure write-back for OAuth connections
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `writebackSchemaId` string: Unique identifier of the write-back destination
            - `description` string: Description for the write-back destination.
          - `inputTableAuditLogSchema` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf0InputTableAuditLogSchema: Schema to use for the input table write-ahead log (WAL). Cannot be changed without breaking write behavior on this connection.
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `writebackSchemaId` string: Unique identifier of the writebackSchema
          - `enableHiveMetastore` boolean: Set to `true` to see and use your `hive_metastore` catalog in Sigma. Defaults to `false`. If you omit this field in an update request, Sigma resets it to `false`.
          - `pythonComputeClusterId` string: ID of the all-purpose compute cluster used to run Python queries. Must be set together with `usePython`. If you omit this field in an update request, Sigma clears the Python configuration.
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails301: Set up OAuth for the connection
          - `useOauth` boolean, required
          - `endpoint` string, required
          - `type` 'databricks', required
          - `host` string, required
          - `workspaceUrl` string
          - `useSourceSwapPolicy` boolean
          - `sourceSwapPolicyId` string
          - `usePython` boolean: Set to `true` to enable Python queries on this Databricks connection. Requires `pythonComputeClusterId`.
          - `metadataUrl` string: OAuth metadata URL for connection-level OAuth.
          - `clientId` string: Client ID for the OAuth application used by this connection.
          - `clientSecret` union: Client secret for the OAuth application used by this connection. This value is write-only and is not returned by the API.
            - string
            - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf1ClientSecret1
              - …
          - `scopes` string[]: OAuth scopes to request when users authenticate to this connection.
          - `idpType` union: OAuth provider type. Supported values are adfs, auth0, azuread, okta, ping, snowflake, aws_databricks, azure_databricks, gcp_databricks, and unknown.
            - 'aws_databricks'
            - 'azure_databricks'
            - 'gcp_databricks'
            - 'azuread'
            - 'auth0'
            - 'adfs'
            - 'okta'
            - 'ping'
            - 'snowflake'
            - 'unknown'
          - `usePkce` boolean, nullable: Whether the OAuth flow should require Proof Key for Code Exchange (PKCE). Databricks-hosted OAuth providers require PKCE.
          - `useJwt` boolean, nullable: Whether the OAuth flow should use JWT bearer token authentication instead of a client secret.
          - `jwkSetId` string: Unique identifier of the JWK set whose active key signs the JWT bearer assertions for this connection. Requires `useJwt` to be true.
          - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf1WriteAccess: Configure write-back for non-OAuth connections
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemas` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf1WritebackSchemasItems[]: Configure write-back for OAuth connections
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `writebackSchemaId` string: Unique identifier of the write-back destination
            - `description` string: Description for the write-back destination.
          - `inputTableAuditLogSchema` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf0OneOf1InputTableAuditLogSchema: Schema to use for the input table write-ahead log (WAL). Cannot be changed without breaking write behavior on this connection.
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `writebackSchemaId` string: Unique identifier of the writebackSchema
          - `enableHiveMetastore` boolean: Set to `true` to see and use your `hive_metastore` catalog in Sigma. Defaults to `false`. If you omit this field in an update request, Sigma resets it to `false`.
          - `pythonComputeClusterId` string: ID of the all-purpose compute cluster used to run Python queries. Must be set together with `usePython`. If you omit this field in an update request, Sigma clears the Python configuration.
      - union
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails310: Set up basic authentication for the connection
          - `token` union, required
            - string
            - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf0Token1
              - …
          - `userAttributes` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf0UserAttributes, required
            - `endpoint` string, required
          - `type` 'databricks', required
          - `host` string, required
          - `workspaceUrl` string
          - `useSourceSwapPolicy` boolean
          - `sourceSwapPolicyId` string
          - `usePython` boolean: Set to `true` to enable Python queries on this Databricks connection. Requires `pythonComputeClusterId`.
          - `metadataUrl` string: OAuth metadata URL for connection-level OAuth.
          - `clientId` string: Client ID for the OAuth application used by this connection.
          - `clientSecret` union: Client secret for the OAuth application used by this connection. This value is write-only and is not returned by the API.
            - string
            - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf0ClientSecret1
              - …
          - `scopes` string[]: OAuth scopes to request when users authenticate to this connection.
          - `idpType` union: OAuth provider type. Supported values are adfs, auth0, azuread, okta, ping, snowflake, aws_databricks, azure_databricks, gcp_databricks, and unknown.
            - 'aws_databricks'
            - 'azure_databricks'
            - 'gcp_databricks'
            - 'azuread'
            - 'auth0'
            - 'adfs'
            - 'okta'
            - 'ping'
            - 'snowflake'
            - 'unknown'
          - `usePkce` boolean, nullable: Whether the OAuth flow should require Proof Key for Code Exchange (PKCE). Databricks-hosted OAuth providers require PKCE.
          - `useJwt` boolean, nullable: Whether the OAuth flow should use JWT bearer token authentication instead of a client secret.
          - `jwkSetId` string: Unique identifier of the JWK set whose active key signs the JWT bearer assertions for this connection. Requires `useJwt` to be true.
          - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf0WriteAccess: Configure write-back for non-OAuth connections
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemas` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf0WritebackSchemasItems[]: Configure write-back for OAuth connections
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `writebackSchemaId` string: Unique identifier of the write-back destination
            - `description` string: Description for the write-back destination.
          - `inputTableAuditLogSchema` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf0InputTableAuditLogSchema: Schema to use for the input table write-ahead log (WAL). Cannot be changed without breaking write behavior on this connection.
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `writebackSchemaId` string: Unique identifier of the writebackSchema
          - `enableHiveMetastore` boolean: Set to `true` to see and use your `hive_metastore` catalog in Sigma. Defaults to `false`. If you omit this field in an update request, Sigma resets it to `false`.
          - `pythonComputeClusterId` string: ID of the all-purpose compute cluster used to run Python queries. Must be set together with `usePython`. If you omit this field in an update request, Sigma clears the Python configuration.
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails311: Set up OAuth for the connection
          - `useOauth` boolean, required
          - `userAttributes` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf1UserAttributes, required
            - `endpoint` string, required
          - `type` 'databricks', required
          - `host` string, required
          - `workspaceUrl` string
          - `useSourceSwapPolicy` boolean
          - `sourceSwapPolicyId` string
          - `usePython` boolean: Set to `true` to enable Python queries on this Databricks connection. Requires `pythonComputeClusterId`.
          - `metadataUrl` string: OAuth metadata URL for connection-level OAuth.
          - `clientId` string: Client ID for the OAuth application used by this connection.
          - `clientSecret` union: Client secret for the OAuth application used by this connection. This value is write-only and is not returned by the API.
            - string
            - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf1ClientSecret1
              - …
          - `scopes` string[]: OAuth scopes to request when users authenticate to this connection.
          - `idpType` union: OAuth provider type. Supported values are adfs, auth0, azuread, okta, ping, snowflake, aws_databricks, azure_databricks, gcp_databricks, and unknown.
            - 'aws_databricks'
            - 'azure_databricks'
            - 'gcp_databricks'
            - 'azuread'
            - 'auth0'
            - 'adfs'
            - 'okta'
            - 'ping'
            - 'snowflake'
            - 'unknown'
          - `usePkce` boolean, nullable: Whether the OAuth flow should require Proof Key for Code Exchange (PKCE). Databricks-hosted OAuth providers require PKCE.
          - `useJwt` boolean, nullable: Whether the OAuth flow should use JWT bearer token authentication instead of a client secret.
          - `jwkSetId` string: Unique identifier of the JWK set whose active key signs the JWT bearer assertions for this connection. Requires `useJwt` to be true.
          - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf1WriteAccess: Configure write-back for non-OAuth connections
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
          - `writebackSchemas` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf1WritebackSchemasItems[]: Configure write-back for OAuth connections
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `writebackSchemaId` string: Unique identifier of the write-back destination
            - `description` string: Description for the write-back destination.
          - `inputTableAuditLogSchema` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf3OneOf1OneOf1InputTableAuditLogSchema: Schema to use for the input table write-ahead log (WAL). Cannot be changed without breaking write behavior on this connection.
            - `writeCatalog` string, required: Catalog or top-level object to contain tables written back to the data platform
            - `writeSchema` string, required: Schema or second-level object to contain tables written back to the data platform
            - `writebackSchemaId` string: Unique identifier of the writebackSchema
          - `enableHiveMetastore` boolean: Set to `true` to see and use your `hive_metastore` catalog in Sigma. Defaults to `false`. If you omit this field in an update request, Sigma resets it to `false`.
          - `pythonComputeClusterId` string: ID of the all-purpose compute cluster used to run Python queries. Must be set together with `usePython`. If you omit this field in an update request, Sigma clears the Python configuration.
    - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails4: Details of the MySQL connection.
      - `type` 'mysql', required
      - `user` string, required
      - `password` union, required
        - string
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf4Password1
          - `type` 'plain', required
          - `value` string, required
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf4Password2
          - `secretManagerId` string, required
          - `secretId` string, required
      - `host` string, required
      - `port` number, double, required
      - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf4WriteAccess
        - `writeSchema` string, required
    - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails5: Details of the Azure SQL DB connection.
      - `type` 'azuresql', required: Azure SQL DB connection type.
      - `server` string, required: Fully qualified server name or host.
      - `database` string, required: Database to connect to on the Azure SQL DB server.
      - `port` number, double, required: Port for the database server.
      - `user` string, required: Username used to authenticate to the database.
      - `password` union, required: Password used to authenticate to the database. This value is write-only and is not returned by the API.
        - string
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf5Password1
          - `type` 'plain', required
          - `value` string, required
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf5Password2
          - `secretManagerId` string, required
          - `secretId` string, required
      - `useReadUncommittedIsolation` boolean: Whether queries run with READ UNCOMMITTED transaction isolation.
      - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf5WriteAccess: Configure write-back for the connection.
        - `writeDatabase` string, required: Database to contain tables written back to the data platform.
        - `writeSchema` string, required: Schema to contain tables written back to the data platform.
    - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails6: Details of the SQL Server connection.
      - `type` 'sqlserver', required: SQL Server connection type.
      - `server` string, required: Fully qualified server name or host.
      - `port` number, double, required: Port for the database server.
      - `user` string, required: Username used to authenticate to the database.
      - `password` union, required: Password used to authenticate to the database. This value is write-only and is not returned by the API.
        - string
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf6Password1
          - `type` 'plain', required
          - `value` string, required
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf6Password2
          - `secretManagerId` string, required
          - `secretId` string, required
      - `useReadUncommittedIsolation` boolean: Whether queries run with READ UNCOMMITTED transaction isolation.
      - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf6WriteAccess: Configure write-back for the connection.
        - `writeDatabase` string, required: Database to contain tables written back to the data platform.
        - `writeSchema` string, required: Schema to contain tables written back to the data platform.
    - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetails7: Details of the Starburst connection.
      - `type` 'starburst', required: Starburst connection type.
      - `host` string, required: The address of your Starburst Galaxy cluster as a URL or an IP address.
      - `port` number, double, required: The port through which Sigma connects to your Starburst Galaxy cluster.
      - `user` string, required: The username of the service account set up by your Starburst administrator.
      - `password` union, required: The password for the service account set up by your Starburst administrator. This value is write-only and is not returned by the API.
        - string
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf7Password1
          - `type` 'plain', required
          - `value` string, required
        - V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf7Password2
          - `secretManagerId` string, required
          - `secretId` string, required
      - `writeAccess` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaDetailsOneOf7WriteAccess: Configure write-back for the connection.
        - `writeCatalog` string, required: Catalog to contain tables written back to the data platform.
        - `writeSchema` string, required: Schema to contain tables written back to the data platform.
  - `name` string, required
  - `description` object
  - `poolSizes` V2ConnectionsPostRequestBodyContentApplicationJsonSchemaPoolSizes: Connection pool sizes. Each pool bounds how many queries of a given type (ad hoc, scheduled, catalog, result cache) run concurrently against the warehouse.
    - `isPoolConfigured` boolean: Whether custom connection pool sizes are configured. If any pool size is supplied without this field, the API stores it as true.
    - `schedulePoolSize` number, double: Pool size for scheduled workloads.
    - `catalogPoolSize` number, double: Pool size for catalog workloads.
    - `resultPoolSize` number, double: Pool size for result cache workloads.
  - `timeoutSecs` number, double
  - `useFriendlyNames` boolean

## Response `201`

The newly created connection.

- ConnectionsCreateConnectionResponse201: The newly created connection.
  - `organizationId` string, required: Unique identifier of the organization
  - `connectionId` string, required: Unique identifier of the connection
  - `isSample` boolean, required: Whether the connection is the Sigma sample data connection
  - `isAuditLog` boolean, required: Whether audit logging is enabled
  - `lastActiveAt` string, date-time, required: Last activity date and time
  - `name` string, required: Name of the connection
  - `type` string, required: Type of the connection (e.g., "bigQuery")
  - `useOauth` boolean, required: Whether OAuth is used
  - `createdBy` string, required: Identifier of the user who created this connection
  - `updatedBy` string, required: Identifier of the user or process that last updated this connection
  - `createdAt` string, date-time, required: When the connection was created
  - `updatedAt` string, date-time, required: When the connection was last updated
  - `isArchived` boolean: Whether the connection is archived
  - `account` string: Account associated with the connection
  - `warehouse` string: Warehouse associated with the connection
  - `user` string: User associated with the connection
  - `httpPath` string: For Databricks connections, HTTP path of the SQL warehouse. Not included when a user attribute sets the HTTP path.
  - `role` string: Role used by the connection user
  - `timeout` V2ConnectionsPostResponsesContentApplicationJsonSchemaTimeout: Timeout settings for the connection, with a default value in seconds
    - `default` number, double, required
    - `worksheet` number, double
    - `dashboard` number, double
    - `download` number, double
  - `poolSizes` V2ConnectionsPostResponsesContentApplicationJsonSchemaPoolSizes: Pool sizes for the connection, such as for catalogPoolSize or schedulePoolSize
    - `isPoolConfigured` boolean
    - `catalogPoolSize` number, double
    - `resultPoolSize` number, double
    - `schedulePoolSize` number, double
  - `writeAccess` boolean
  - `friendlyName` boolean: Whether friendly names are enabled for this connection
  - `writebacks` V2ConnectionsPostResponsesContentApplicationJsonSchemaWritebacksItems[]: Configure write-back for non-OAuth connections
    - `database` string, required: Database, catalog, or top-level object to contain tables written back to the data platform
    - `schema` string, required: Schema, database, or second-level object to contain tables written back to the data platform
    - `writebackSchemaId` string: Unique identifier of the writebackSchema
    - `description` string: Description for the write-back destination.
  - `writebackSchemas` V2ConnectionsPostResponsesContentApplicationJsonSchemaWritebackSchemasItems[]: Configure write-back for OAuth connections
    - `database` string, required: Database, catalog, or top-level object to contain tables written back to the data platform
    - `schema` string, required: Schema, database, or second-level object to contain tables written back to the data platform
    - `writebackSchemaId` string: Unique identifier of the writebackSchema
    - `description` string: Description for the write-back destination.
  - `inputTableAuditLogSchema` V2ConnectionsPostResponsesContentApplicationJsonSchemaInputTableAuditLogSchema: Schema to use for the input table write-ahead log (WAL). Cannot be changed without breaking write behavior on this connection.
    - `database` string, required: Database, catalog, or top-level object to contain tables written back to the data platform
    - `schema` string, required: Schema, database, or second-level object to contain tables written back to the data platform
    - `writebackSchemaId` string: Unique identifier of the writebackSchema
  - `materializationWarehouse` string: Warehouse used to run materialization jobs
  - `exportsWarehouse` string: Warehouse used to run export jobs
  - `oauthMetadataUrl` string: OAuth metadata URL configured directly on this connection.
  - `oauthClientId` string: Client ID configured directly on this connection.
  - `oauthScopes` string[]: OAuth scopes configured directly on this connection.
  - `oauthIdpType` union: OAuth provider type configured or inferred for this connection.
    - 'aws_databricks'
    - 'azure_databricks'
    - 'gcp_databricks'
    - 'azuread'
    - 'auth0'
    - 'adfs'
    - 'okta'
    - 'ping'
    - 'snowflake'
    - 'unknown'
  - `oauthUsePkce` boolean, nullable: Whether this connection-level OAuth configuration uses PKCE.
  - `oauthUseJwt` boolean, nullable: Whether this connection-level OAuth configuration uses JWT bearer token authentication.
  - `oauthJwkSetId` string: Unique identifier of the JWK set used to sign JWT bearer assertions for this connection.
  - `oauthAudience` string: Audience used for OAuth federation, such as the Google workforce identity federation audience for BigQuery.
  - `isIndependentOAuth` boolean: Whether this connection uses connection-level OAuth instead of organization-level OAuth.
  - `userAttributes` V2ConnectionsPostResponsesContentApplicationJsonSchemaUserAttributes: User attributes associated with the connection
    - `role` string
    - `warehouse` string
  - `roleSwitching` 'allRoles' | 'disabled': Whether a Snowflake OAuth connection allows users to switch roles when running queries. Only relevant for Snowflake OAuth connections.
  - `enableHiveMetastore` boolean: Whether this Databricks connection exposes the `hive_metastore` catalog in Sigma. Only relevant for Databricks connections.
  - `usePython` boolean
  - `pythonComputeClusterId` string: ID of the all-purpose compute cluster used to run Python queries. Only relevant for Databricks connections with Python enabled.

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
