---
title: "Get full schema"
method: GET
path: "/schema/{connectionId}"
tags: ["Schema"]
---

# Get full schema

`GET /schema/{connectionId}`

## Request

- Base URL: `https://saturnsql.com/api`
- URL: `https://saturnsql.com/api/schema/{connectionId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns every table and column for a connection, so an agent can write SQL against the real structure. For large databases prefer GET /schema/context. Available to API keys with the `read` scope.

## Path parameters

- `connectionId` string, required

## Response `200`

Tables

- Table[]
  - `name` string, required
  - `columns` Column[], required
    - `name` string, required
    - `type` string, required
    - `nullable` boolean, required
    - `default` string, nullable
    - `isPrimaryKey` boolean
    - `isForeignKey` boolean

## Other responses

- `401`: Bad or missing credentials
- `404`: Connection not found

---

[API](https://skmtc.dev/saturnsql/apis/saturnsql-api.md) · [All operations](https://skmtc.dev/saturnsql/apis/saturnsql-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saturnsql/apis/saturnsql-api/revisions/90a3e54ad115?raw)
