For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
GuidesAPI Reference
  • API Reference
      • POSTUpsert Schema Fields
      • DELDelete Schema Field
      • PATCHPatch Schema Field
      • PUTSet Primary Keys
      • DELReset Primary Keys
      • POSTRefresh Connection Schema
      • GETGet Schema Status
      • GETGet Schema
      • GETGet Schema Records
Logo
Log inBook a demo
API ReferenceSchemas

Get Schema

GET
https://app.polytomic.com/api/connections/:id/schemas/:schema_id
GET
/api/connections/:id/schemas/:schema_id
$curl https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/schemas/public.users \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "data": {
3 "fields": [
4 {
5 "association": {
6 "id": "fk_user_profile",
7 "name": "UserProfileAssociation",
8 "reference_to": [
9 "public.profiles"
10 ],
11 "referenced_field": "user_id"
12 },
13 "id": "email",
14 "is_primary_key": true,
15 "name": "Email",
16 "path": "$.email",
17 "remote_type": "varchar(255)",
18 "type": "string",
19 "user_managed": true,
20 "values": [
21 {
22 "label": "Work Email",
23 "value": "work@example.com"
24 },
25 {
26 "label": "Personal Email",
27 "value": "personal@example.com"
28 }
29 ]
30 }
31 ],
32 "id": "public.users",
33 "name": "Users"
34 }
35}
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.
Was this page helpful?
Previous

Get Schema Records

Next

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 and wait for it to complete before fetching this endpoint if you need up-to-date field definitions.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Path parameters

idstringRequiredformat: "uuid"
Unique identifier of the connection.
schema_idstringRequired

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-VersionstringOptional

Response

OK
dataobject

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error