---
title: "Get a diagram's full schema document"
method: GET
path: "/diagrams/{uuid}/schema-full"
tags: ["Diagrams"]
---

# Get a diagram's full schema document

`GET /diagrams/{uuid}/schema-full`

## Request

- Base URL: `https://api.drawsql.app/v1`
- URL: `https://api.drawsql.app/v1/diagrams/{uuid}/schema-full`
- Auth: HTTP bearer

The verbatim, re-importable DrawSQL JSON document for a diagram: the same
denormalized shape as `/schema`, plus layout (positions, colors, sizes),
`groups`, and `sticky_notes`. This is the native canvas format, minus only
security-sensitive persistence fields.

The curated `/schema` profile is a strict subset of this document.
Supports ETag conditional requests. Here the ETag tracks the schema
revision, so ANY edit (including a canvas-only layout change) yields a new
ETag. Rate limit: 30 requests/minute per token.

## Path parameters

- `uuid` string, uuid, required

## Headers

- `If-None-Match` string

## Response `200`

The full schema document.

- object
  - `data` SchemaFull, required: The verbatim, re-importable DrawSQL JSON document: the schema-pure shape plus layout, `groups`, and `sticky_notes`. Security-sensitive persistence fields are stripped. `Schema` is a strict subset of this.
    - `driver` string, nullable, required
    - `schema_version` number, required
    - `tables` TableFull[], required
      - `uuid` string, uuid, required
      - `name` string, nullable, required
      - `comment` string, nullable, required
      - `color` string, required
      - `order` string, required: Fractional order key.
      - `width` integer, nullable, required
      - `left` integer, required
      - `top` integer, required
      - `parent_uuid` string, nullable, required: UUID of the group this table belongs to, if any.
      - `record_type` string, required
      - `columns` ColumnFull[], required
        - `uuid` string, uuid, required
        - `table_uuid` string, uuid, required
        - `name` string, nullable, required
        - `driver_data_type_name` string, required: Resolvable type identifier — look it up in `GET /v1/data-types`.
        - `driver_data_type_params` unknown[], nullable, required
          - unknown
        - `default` union, required
          - string
          - number
        - `default_type` string
        - `order` string, required
        - `is_nullable` boolean, required
        - `is_primary_key` boolean, required
        - `is_unique_key` boolean, required
        - `is_index` boolean, required
        - `is_auto_increment` boolean, required
        - `is_unsigned` boolean, required
        - `enum_values` string[]
        - `set_values` string[]
        - `array_suffix` string
        - `identity_params` object
        - `comment` string, nullable, required
      - `indexes` IndexFull[], required
        - `uuid` string, uuid, required
        - `table_uuid` string, uuid, required
        - `name` string, nullable, required
        - `type` string, required
        - `order` string, required
        - `column_uuids` string[], required: UUIDs of the columns covered by this index, in order.
        - `columns` IndexColumnRef[], required
          - `uuid` string, uuid, required
          - `name` string, nullable, required
    - `relationships` RelationshipFull[], required
      - `uuid` string, uuid, required
      - `source_column_uuid` string, uuid, required
      - `source_table_uuid` string, uuid, required
      - `target_column_uuid` string, uuid, required
      - `target_table_uuid` string, uuid, required
      - `order` string, nullable, required
      - `type` string, required
      - `name` string
      - `record_type` string, required
    - `groups` Group[], required
      - `uuid` string, uuid, required
      - `name` string, nullable, required
      - `color` string, required
      - `order` string, required
      - `width` integer, required
      - `height` integer, required
      - `left` integer, required
      - `top` integer, required
      - `comment` string, nullable, required
      - `is_collapsed` boolean, nullable, required
      - `record_type` string, required
    - `sticky_notes` StickyNote[], required
      - `uuid` string, uuid, required
      - `content` string, nullable, required
      - `color` string, required
      - `order` string, required
      - `width` integer, required
      - `height` integer, required
      - `left` integer, required
      - `top` integer, required
      - `parent_uuid` string, nullable, required
      - `font_size` integer, required
      - `record_type` string, required

## Other responses

- `304`: The document is unchanged since the supplied `If-None-Match`.
- `401`: Missing, malformed, expired, or revoked token (code `unauthenticated`), or a valid token whose team no longer exists or whose user is no longer a member of that team (code `invalid_token`).
- `403`: The token's team is not on a paid plan (code `plan_required`), or the token is not allowed to perform this action (code `forbidden`).
- `404`: No such diagram, or it is not visible to this token.
- `409`: The diagram is still importing, so it has no schema yet. Poll `GET /diagrams/{uuid}` until `status` is `ready`.
- `429`: Too many requests.

---

[API](https://skmtc.dev/drawsql/apis/drawsql-api.md) - [All operations](https://skmtc.dev/drawsql/apis/drawsql-api/llms.txt) - [OpenAPI document](https://skmtc.dev/drawsql/apis/drawsql-api/revisions/8b333e0bae67?raw)
