> ## 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 Draft Compatibility

> Whether the working copy fits one environment's database: whether what is ticked could run there, and which of the draft's tables and columns, ticked or not, that database lacks. Read from the stored catalog, so it queries no database.



## OpenAPI

````yaml get /v2/api/projects/{projectId}/workspaces/{workspaceId}/draft/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}/workspaces/{workspaceId}/draft/compatibility:
    get:
      summary: Whether the working copy fits one environment's d…
      description: >-
        Whether the working copy fits one environment's database: whether what
        is ticked could run there, and which of the draft's tables and columns,
        ticked or not, that database lacks. Read from the stored catalog, so it
        queries no database.
      operationId: GetV2ApiProjectsProjectIdWorkspacesWorkspaceIdDraftCompatibility
      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 workspace belongs 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 workspace belongs to.
        - name: workspaceId
          in: path
          required: true
          description: The workspace.
          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 workspace.
        - name: environment
          in: query
          required: false
          description: >-
            The environment to compare the working copy with: `production` (the
            default) or one the project created, such as `staging`.
          schema:
            description: >-
              The environment to compare the working copy with: `production`
              (the default) or one the project created, such as `staging`.
            type: string
      responses:
        '200':
          description: >-
            GET
            /v2/api/projects/:projectId/workspaces/:workspaceId/draft/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.
                      connectionId:
                        type:
                          - string
                          - '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
                        description: >-
                          Tables the version uses that the environment's
                          database lacks.
                      missingColumns:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: array
                          items:
                            type: string
                        description: >-
                          Per table the database has: the columns the version
                          uses that it lacks.
                      checkedAt:
                        type:
                          - string
                          - 'null'
                      absentTables:
                        type: array
                        items:
                          type: string
                        description: >-
                          Every table of the working copy, ticked or not, that
                          this environment's database lacks (`schema.table`).
                          What the schema editor marks "not in <environment>".
                      absentColumns:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: array
                          items:
                            type: string
                        description: >-
                          Per working-copy table the database has: its columns,
                          ticked or not, that the database lacks.
                    required:
                      - environment
                      - name
                      - connectionId
                      - status
                      - missingTables
                      - missingColumns
                      - checkedAt
                      - absentTables
                      - absentColumns
                    additionalProperties: false
                    description: >-
                      Whether the working copy, as it would publish, could run
                      in one environment (`status`, `missingTables`,
                      `missingColumns` cover only what is ticked), and which of
                      its tables and columns that environment's database lacks
                      at all. Read from the stored catalog: no query reaches the
                      database.
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            GET
            /v2/api/projects/:projectId/workspaces/:workspaceId/draft/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.