---
title: "Get Schema"
method: GET
path: "/api/connections/{id}/schemas/{schema_id}"
tags: ["Schemas"]
---

# Get Schema

`GET /api/connections/{id}/schemas/{schema_id}`

Returns a single schema on a connection.

The schema is returned from the connection's cached schema set. If the
upstream source has changed since the last inspection, the result may be
stale.

> 📘 Trigger [`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh)
> and wait for it to complete before fetching this endpoint if you need
> up-to-date field definitions.

## Path parameters

- `id` string, uuid, required — Unique identifier of the connection.
- `schema_id` string, required — Identifier of the schema within the connection. Format depends on the connection type (e.g. schema.table for databases, object name for SaaS backends).

## Headers

- `X-Polytomic-Version` string

## Response `200`

OK

- BulkSyncSourceSchemaEnvelope
  - `data` Schema
    - `fields` SchemaField[]
      - `association` SchemaAssociation
        - `id` string
        - `name` string
        - `reference_to` string[]
        - `referenced_field` string
      - `id` string
      - `is_primary_key` boolean — Whether this field is part of the schema's primary key, including any user override.
      - `name` string
      - `path` string — JSONPath used to extract the field from each source record; only meaningful for document-style backends.
      - `remote_type` string — The type of the field from the remote system.
      - `type` 'unknown' | 'string' | 'number' | 'boolean' | 'datetime' | 'array' | 'object' | 'binary'
      - `type_spec` unknown
      - `user_managed` boolean — True when the field's effective definition came from a user override.
      - `values` PickValue[]
        - `label` string
        - `value` string
    - `id` string
    - `name` string

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/polytomic/apis/polytomic-api.md) · [All operations](https://skmtc.net/polytomic/apis/polytomic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/polytomic/polytomic-api/revisions/31d9a913d396/schema)
