> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsolve.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Connection

> Update a connection



## OpenAPI

````yaml patch /v1/api/connection
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.5.0
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v1/api/connection:
    patch:
      summary: Update a connection
      description: Update a connection
      operationId: PatchV1ApiConnection
      requestBody:
        description: PATCH /v1/api/connection Request body
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKey:
                  type: string
                  minLength: 1
                  description: >-
                    Upsolve API key, generated under Account → Developer
                    settings in the Upsolve Hub. Keys are user-scoped: pass
                    organizationId alongside the key to select which org to act
                    on.
                  examples:
                    - up_embed_************
                organizationId:
                  description: >-
                    Your Upsolve organization's UUID — the org that owns the API
                    key and project. This is NOT a project organization: do not
                    pass a value registered via /projects/register-organization,
                    and do not pass an `externalId` (only
                    `projectOrganizationId` accepts those). Omit it when using
                    an org-bound API key — the org is read from the key and any
                    value sent here is ignored. Required only for user-scoped
                    API keys (created under Account → Developer settings) and
                    for the Supabase JWT path, where the org is ambiguous and
                    membership is verified against it.
                  examples:
                    - 123e4567-e89b-12d3-a456-426614174000
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                connection:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    type:
                      type: string
                    config:
                      oneOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Bigquery
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                          required:
                            - type
                            - user
                            - host
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Clickhouse
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                            defaultSchema:
                              description: >-
                                Default database value to be used for admins.
                                When set, schema-based tenancy is enabled and
                                metadata will only include tables from this
                                database. May be a comma-separated list (e.g.
                                'db1,db2') to scope metadata across multiple
                                databases.
                              type: string
                          required:
                            - type
                            - user
                            - host
                        - type: object
                          properties:
                            type:
                              type: string
                              const: MS SQL
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                          required:
                            - type
                            - user
                            - host
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Redshift
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                            rlsVariable:
                              description: RLS variable to be used when RLS is enabled.
                              type: string
                            defaultRlsValue:
                              description: >-
                                Default RLS value to be used when RLS is
                                enabled.
                              type: string
                          required:
                            - type
                            - user
                            - host
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Snowflake
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                            authenticator:
                              description: >-
                                Set to SNOWFLAKE_JWT to sign in with a key pair:
                                the decrypted credential is then used as the PEM
                                private key instead of a password.
                              type: string
                              enum:
                                - SNOWFLAKE_JWT
                            warehouse:
                              description: >-
                                Snowflake warehouse the session uses for
                                compute.
                              type: string
                            role:
                              description: Snowflake role the session assumes.
                              type: string
                            managedBy:
                              description: >-
                                Set when Upsolve provisioned and owns the
                                database (Easy connect). Deleting the connection
                                then also deletes what it points at.
                              type: string
                              enum:
                                - easy_connect
                          required:
                            - type
                            - user
                            - host
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Timescale
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                          required:
                            - type
                            - user
                            - host
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Supabase
                            url:
                              type: string
                              description: Supabase project URL
                            key:
                              type: string
                              description: Supabase Anon key
                            serviceKey:
                              description: >-
                                Deprecated and no longer used for authentication
                                — admin queries mint a short-lived token from
                                jwtSecret. Kept as an optional field only for
                                backward compatibility with existing stored
                                configs; the product never reads or writes it,
                                and it is stripped from API responses.
                              type: string
                            isReadReplica:
                              description: >-
                                Whether to use read replica (sets get: true for
                                RPC calls)
                              type: boolean
                            jwtSecret:
                              description: >-
                                Supabase legacy JWT secret (HS256) for minting
                                user-scoped JWTs to enable RLS in preview mode
                              type: string
                            schemas:
                              description: >-
                                Optional comma-separated list of schemas to
                                restrict metadata introspection to (e.g.
                                'public,analytics'). When empty, all non-system
                                schemas are scanned.
                              type: string
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                          required:
                            - type
                            - url
                            - key
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Data plane
                            apiKey:
                              type: string
                              description: Data plane API key
                            defaultSchema:
                              description: >-
                                Default schema value to be used. When set,
                                schema based tenancy is enabled.
                              type: string
                          required:
                            - type
                            - apiKey
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Postgres
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                            rlsVariable:
                              description: RLS variable to be used when RLS is enabled.
                              type: string
                            defaultRlsValue:
                              description: >-
                                Default RLS value to be used when RLS is
                                enabled.
                              type: string
                          required:
                            - type
                            - user
                            - host
                        - type: object
                          properties:
                            type:
                              type: string
                              const: MySQL
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                            ssl:
                              description: >-
                                Whether to use SSL for the connection. Defaults
                                to true for backward compatibility.
                              type: boolean
                          required:
                            - type
                            - user
                            - host
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Trino
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              type: string
                              description: Connection host address
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                            catalog:
                              type: string
                              description: Trino catalog name
                            defaultSchema:
                              description: >-
                                Default schema in the catalog (e.g. demo,
                                public)
                              type: string
                          required:
                            - type
                            - user
                            - host
                            - catalog
                        - type: object
                          properties:
                            type:
                              type: string
                              const: Athena
                            user:
                              type: string
                              description: Connection username
                            password:
                              description: Connection password
                              type: string
                            credential:
                              description: Connection password (encrypted)
                              type: string
                            host:
                              description: >-
                                Unused for Athena — the AWS SDK resolves the
                                endpoint by region
                              type: string
                            database:
                              description: >-
                                Connection database name. For BigQuery, MS SQL,
                                MySQL, and Clickhouse this may be a
                                comma-separated list (e.g. 'db1,db2') to fetch
                                metadata across multiple databases on the same
                                connection; the first entry is used as the
                                initial catalog. Cross-database references in
                                generated SQL require the connecting login/role
                                to have access to every listed database.
                              type: string
                            port:
                              description: Connection port number
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            bigIntMode:
                              description: Big integer mode configuration
                              type: string
                              enum:
                                - string
                                - number
                                - bigint
                            poolSize:
                              description: The size of the connection pool
                              type: number
                            concurrencyLimit:
                              description: >-
                                The max number of concurrent calls to be made to
                                the db
                              type: number
                            intervalLimit:
                              description: >-
                                The max number of calls that can be made in a
                                certain time interval
                              type: number
                            intervalTime:
                              description: >-
                                The amount of time (ms) that needs to be awaited
                                before a new batch of calls can be made beyond
                                the interval limit
                              type: number
                            requiresSchemaLevelSecurity:
                              description: >-
                                Each customer's data is in a schema of its own
                                with the same tables. The connection's tables
                                are listed once by name, and a data model's
                                Schema Rule chooses the customer's schema when a
                                query runs.
                              type: boolean
                            region:
                              type: string
                              description: >-
                                AWS region hosting the Athena workgroup (e.g.
                                us-east-1)
                            outputLocation:
                              type: string
                              description: >-
                                S3 URI where Athena writes query results, e.g.
                                s3://my-bucket/athena-results/. Required: the
                                IAM principal must be able to write here and
                                read back the result object.
                            workgroup:
                              description: >-
                                Athena workgroup to run queries in. Defaults to
                                'primary'.
                              type: string
                            catalog:
                              description: >-
                                Glue data catalog to resolve tables against.
                                Defaults to 'AwsDataCatalog'.
                              type: string
                            schemas:
                              description: >-
                                Optional comma-separated list of schemas to
                                restrict metadata introspection to (e.g.
                                'dw,domain_*_mart*'). Supports '*' wildcards.
                                When empty, every schema in the catalog is
                                scanned — on a catalog with thousands of schemas
                                that is slow and rarely intended. Independent of
                                `database`, which only sets what unqualified
                                table names resolve against at execution time.
                              type: string
                          required:
                            - type
                            - user
                            - region
                            - outputLocation
                      discriminator:
                        propertyName: type
                  required:
                    - id
              required:
                - connection
            examples:
              example1:
                value:
                  apiKey: up_embed_************
                  organizationId: 123e4567-e89b-12d3-a456-426614174000
        required: true
      responses:
        '200':
          description: PATCH /v1/api/connection Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: PATCH /v1/api/connection Negative response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - error
                additionalProperties: false
      security:
        - APIKEY_1: []
components:
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: query
      name: apiKey
      x-in-actual: body
      description: apiKey MUST be supplied within the request body instead of query

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.