JSON:API · v1
Data models
Manage logical warehouse schemas and their fields.
Bearer authentication
api_read / api_write by operation
Stable
Operations
GET
List data model fields
/api/json/v1/data_model_fields
List data model fields visible to the authenticated service account.
POST
Create a data model field
/api/json/v1/data_model_fields
Create a new data model field in the service account's workspace.
GET
Retrieve a data model field
/api/json/v1/data_model_fields/{id}
Retrieve one data model field visible to the authenticated service account.
GET
List data models
/api/json/v1/data_models
List data models visible to the authenticated service account.
POST
Create a data model
/api/json/v1/data_models
Create a new data model in the service account's workspace.
GET
Retrieve a data model
/api/json/v1/data_models/{id}
Retrieve one data model visible to the authenticated service account.
PATCH
Update a data model
/api/json/v1/data_models/{id}
Update the supported fields of one data model.
Objects and fields
These are the reviewed public attributes. Fields omitted from this contract are not part of the API, even when they exist internally.
Data model field
type: data_model_field
7 fields
Public JSON:API resource object for data model fields.
| Field | Type | Presence | Description |
|---|---|---|---|
| constraints | object | null | Optional · nullable | Forward-compatible map of UI-captured constraints (e.g. max_length, min, max, regex, past_only, future_only). Not yet enforced server-side. Field included by default. |
| data_model_id | string | Required | Data model id returned by the public contract. |
| description | string | null | Optional · nullable | Optional human-readable description of the field's purpose. Field included by default. |
| is_primary_key | boolean | null | Optional · nullable | If true, this field identifies the business entity for grouping/aggregating Facts. Field included by default. |
| is_required | boolean | null | Optional · nullable | Is required returned by the public contract. |
| name | string | Required | Field name, e.g. "email_address". Must start with a lowercase letter; lowercase letters, numbers, and underscores only. Field included by default. |
| type | enum: string | integer | boolean | datetime | float | map | null | Optional · nullable | Data type for validation. Field included by default. |
Data model
type: data_model
6 fields
Public JSON:API resource object for data models.
| Field | Type | Presence | Description |
|---|---|---|---|
| description | string | null | Optional · nullable | Human-readable description. |
| json_schema | object | null | Optional · nullable | JSON Schema Draft 7 generated from DataModelFields |
| name | string | Required | Human-readable name, e.g. "Customer". Field included by default. |
| organization_id | string | Required | Organization that owns the resource. |
| retention_days | integer | null | Optional · nullable | How many days of records to keep. Records observed before that window are permanently deleted by the nightly sweep. Nil keeps every record. Field included by default. |
| slug | string | Required | URL-safe identifier, e.g. "customer" (unique per organization). Field included by default. |