> ## 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.

# Check Environment Connection Compatibility

> Check a connection's database in this environment against the workspaces built on the connection: for each, the tables and columns its served version uses that the database lacks. Reads stored catalogs only; refresh the database's catalog first for an up-to-date answer.



## OpenAPI

````yaml get /v2/api/projects/{projectId}/environments/{environment}/connections/{sourceConnectionId}/compatibility
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.5.0
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v2/api/projects/{projectId}/environments/{environment}/connections/{sourceConnectionId}/compatibility:
    get:
      summary: Check a connection's database in this environment…
      description: >-
        Check a connection's database in this environment against the workspaces
        built on the connection: for each, the tables and columns its served
        version uses that the database lacks. Reads stored catalogs only;
        refresh the database's catalog first for an up-to-date answer.
      operationId: >-
        GetV2ApiProjectsProjectIdEnvironmentsEnvironmentConnectionsSourceConnectionIdCompatibility
      parameters:
        - name: apiKey
          in: query
          required: false
          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.
          schema:
            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_************
          examples:
            example1:
              value: up_embed_************
        - name: organizationId
          in: query
          required: false
          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.
          schema:
            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})$
          examples:
            example1:
              value: 123e4567-e89b-12d3-a456-426614174000
        - name: projectId
          in: path
          required: true
          description: The project the environments belong to.
          schema:
            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})$
            description: The project the environments belong to.
        - name: environment
          in: path
          required: true
          description: The environment's slug, e.g. `staging`.
          schema:
            type: string
            description: The environment's slug, e.g. `staging`.
        - name: sourceConnectionId
          in: path
          required: true
          description: The connection whose database in this environment to check.
          schema:
            type: string
            description: The connection whose database in this environment to check.
      responses:
        '200':
          description: >-
            GET
            /v2/api/projects/:projectId/environments/:environment/connections/:sourceConnectionId/compatibility
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      environment:
                        type: string
                        description: The environment's slug.
                      name:
                        type: string
                        description: The environment's display name.
                      sourceConnectionId:
                        type: string
                        description: The connection checked.
                      connectionId:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                        enum:
                          - compatible
                          - incompatible
                          - unknown
                          - unmapped
                        description: >-
                          The worst of the workspaces' statuses: compatible only
                          when every workspace on the connection finds every
                          table and column it uses.
                      checkedAt:
                        type:
                          - string
                          - 'null'
                      workspaces:
                        type: array
                        items:
                          type: object
                          properties:
                            workspaceId:
                              type: string
                            name:
                              type: string
                            version:
                              type:
                                - number
                                - 'null'
                            status:
                              type: string
                              enum:
                                - compatible
                                - incompatible
                                - unknown
                                - unmapped
                              description: >-
                                compatible: every table and column the version
                                uses exists in that environment's database.
                                incompatible: some do not. unknown: the
                                database's catalog has never been read.
                                unmapped: the environment has no connection for
                                this workspace.
                            missingTables:
                              type: array
                              items:
                                type: string
                            missingColumns:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties:
                                type: array
                                items:
                                  type: string
                          required:
                            - workspaceId
                            - name
                            - version
                            - status
                            - missingTables
                            - missingColumns
                          additionalProperties: false
                        description: >-
                          Every workspace in this project built on the
                          connection.
                    required:
                      - environment
                      - name
                      - sourceConnectionId
                      - connectionId
                      - status
                      - checkedAt
                      - workspaces
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            GET
            /v2/api/projects/:projectId/environments/:environment/connections/:sourceConnectionId/compatibility
            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_2: []
components:
  securitySchemes:
    APIKEY_2:
      type: apiKey
      in: query
      name: apiKey

````

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