Views
View Model
Fields
Field | Type | Description |
|---|---|---|
mapping_policy_revision | number | null | |
mapping_policy_nullable_inputs | string[] | |
mapping_policy_fallback_groups | string[][] | |
mapping_policy_allow_drops | boolean | |
mapping_policy_output_bindings | Record<string, string[]> | |
mapping_generation | number | |
object | "view" | |
id | string | Unique identifier, prefixed with viw_. |
team_id | string | |
project_id | string | |
collection_id | string | null | The collection this view reads from; null when it reads from another view. |
collection_name | string | null | Display name of that collection. |
parent_view_id | string | null | The view this one is derived from; null when it reads from a collection. |
parent_view_name | string | null | Display name of that view. |
type | | How the view's records are produced: transform (one collection or view through a script) or
join (a base view with lookup rows attached). Fixed at creation. |
transform_mode | | How a new schema version gets its transform script: reused from the view or generated (auto),
reused or written by you (manual), or only the one you set on that version (explicit). |
name | string | |
hint | string | null | Plain-language guidance the generator uses when it writes transform scripts. |
output_schema | ViewOutputField[] | The fields this view's records contain. |
display_fields | ViewDisplayFields | null | Which field labels which in charts: a field of the view mapped to the view field whose value
names it, such as { "user_id": "user_name" }. A chart grouped by user_id then labels each
series with the latest user_name its records carry. Null when never set. |
status | | Whether the view is producing records, still being set up, or failed. |
error_message | string | null | Why the view failed, when its status is error. |
waiting_shapes_count | number | How many event shapes arrived that no transform serves yet. Their records are stored and catch up automatically once a script covers them; the shapes are listed by the view's deferrals endpoint. |
deleted_at | | null | When the view is scheduled to be deleted; null when it is not. |
created_at | | |
updated_at | | |
join_base_view_id | string | null | The base view on a join view; null on other views. |
join_base_view_name | string | null | |
join_status | | null | |
join_backfill_cutoff_at | | null | Records after this instant are joined live. |
join_live_started_at | | null | When the join started matching new records. |
join_lookup_progress | LookupProgress | null | Lookup progress keyed by clause alias. |
join_base_file_count | number | null | Number of base-view files to backfill. |
join_base_files_done | number | null | Number of base-view files already processed. |
join_error_message | string | null | |
join_created_at | | null | |
join_updated_at | | null | |
joins | ViewJoinClause[] | The views joined onto the base view, on a join view. |
metrics_count | number | How many metrics read from this view. |
derived_views_count | number | How many views are derived from this one. |
join_views_count | number | How many join views use this one as an input. |
transform_count | number | How many transforms this view has. |
drains_count | number | How many drains forward this view's records. |
backfill_file_count | number | How many files every transform on this view has to process between them. |
backfill_files_done | number | How many of those files they have processed. |
backfill_row_count | number | How many records every transform on this view has to reprocess between them, counted when each backfill is planned. |
backfill_rows_read | number | How many of those records they have reprocessed. |
backfill_started_at | | null | When the earliest of those backfills began. This is the earliest start across the whole view, which is what a throughput estimate has to measure elapsed time from. |
View Transform Model
Fields
Field | Type | Description |
|---|---|---|
object | "view_transform" | |
id | string | Unique identifier, prefixed with vtr_. |
view_id | string | The view this transform produces records for. |
transform_script | string | null | The TGL script that maps incoming records onto the view's fields; null until one is written. |
status | | Whether the transform is running, waiting for a script, or failed. |
error_message | string | null | Why the transform failed, when its status is error. |
authoring_reason | string | null | What a queued transform's script waits for: waiting_for_lookups while a join's lookups are
being built, collecting_samples while no record can show what the script must handle yet (on
a join, no base record has a match in every lookup), waiting_for_first_input while its inputs
hold no records, manual_mapping when it needs a script you write, and needs_hint when the
generator asks you for a hint. Other values name what holds generation back, such as the hourly
generation limit. Null when it waits on nothing. |
tgl_retry_count | number | How many times script generation has been retried for this transform. |
max_read_depth | number | null | How many levels deep into a record the script reads. |
evidence_notice | ViewEvidenceNotice | null | Set when a path this mapping read as empty at authoring time has since carried a value with a
type, listing those paths as L<depth>:<path> read keys. Rows keep flowing; re-author the
mapping to use the new column. Cleared when a new script is generated. |
backfill_status | | Whether existing records have been reprocessed through this transform yet. |
backfill_cutoff_at | | null | Records after this time are handled live rather than by the backfill. |
backfill_started_at | | null | When the backfill began. |
backfill_completed_at | | null | When the backfill finished. |
backfill_file_count | number | How many files the backfill has to process. |
backfill_files_done | number | How many of those files it has processed. |
backfill_row_count | number | How many records the backfill has to reprocess, counted when it is planned. |
backfill_rows_read | number | How many of those records it has reprocessed. |
backfill_error | string | null | Why the backfill failed, when it did. |
assignments | ViewTransformAssignment[] | Backfill progress for each source schema version this transform covers. |
created_at | | |
updated_at | |
View Version Model
Fields
Field | Type | Description |
|---|---|---|
object | "view_version" | |
id | string | Unique identifier, prefixed with vta_. |
view_id | string | |
version | number | The source schema version this row covers. Versions rise as the source's shape changes. |
transform_id | string | The transform whose script serves this version. Several versions can share one transform. |
status | | Whether the transform is running, waiting for a script, or failed. |
error_message | string | null | Why the transform failed, when its status is error. |
excluded_at | | null | When this version was excluded from the view; null while it is included. Its records stay
stored and never reach the view. status still reports the transform, which an exclusion
leaves as it was. |
exclusion_reason | string | null | The reason given when the version was excluded. |
evidence_notice | ViewEvidenceNotice | null | Set when a path the serving script read as empty at authoring time has since carried a value
with a type; lists those paths as L<depth>:<path> read keys. Re-author the mapping to use the
new column. Cleared when a new script is generated. |
script_hash | string | null | Identity of the script text. Versions sharing a hash run the identical script. |
script | string | null | The TGL script serving this version; null until one is written. |
backfill_status | | Whether the records already on this schema version have been reprocessed yet. |
backfill_started_at | | null | When the backfill began. |
backfill_completed_at | | null | When the backfill finished. |
backfill_file_count | number | How many files the backfill has to process for this version. |
backfill_files_done | number | How many of those files it has processed. |
backfill_row_count | number | How many records the backfill has to reprocess for this version, counted when it is planned. |
backfill_rows_read | number | How many of those records it has reprocessed. |
backfill_error | string | null | Why the backfill failed, when it did. |
created_at | | When the view started covering this schema version. |
updated_at | | When the transform serving this version last changed. |
Waiting Shape Model
Fields
Field | Type | Description |
|---|---|---|
episode | number | |
observation_count | string | null | |
retained_rows | number | |
first_observed_at | | null | |
last_observed_at | | null | |
next_action_at | | null | |
hint_question | string | null | |
hint_reason | string | null | |
hint_paths | string[] | |
hint_requested_at | string | null | |
hint_mapping_generation | number | null | |
exclusion_reason | string | null | |
excluded_at | | null | |
transform_id | string | null | |
object | "view_shape_deferral" | |
id | string | Unique identifier, prefixed with vsd_. |
view_id | string | |
full_signature | string | The typed signature identifying the event shape. |
event_count | number | Roughly how many events of the shape arrived while it was waiting; retries can count an event more than once. |
first_event_at | | null | The earliest event time seen for the shape. Completeness reporting pins to this instant. |
first_deferred_at | | |
last_deferred_at | | |
resolved_at | | null | When the shape became served; null while it is still waiting. |
reason | | Why the shape is waiting: settling until its schema version settles (views leave a version
alone until then), collecting_samples until enough evidence is available to author a mapping,
awaiting_script until a transform covers it, generation_failed when script generation gave
up, catching_up while its records backfill, served once resolved. |
schema_version | number | null | The schema version the shape belongs to. Null while no version is linked to it. |
schema_version_id | string | null | Id of that schema version, prefixed with csv_. Settle a settling shape by passing it to
Update Collection Schema. |
created_at | |
Shape Inspection Model
Fields
Field | Type |
|---|---|
view_id | string |
deferral_id | string |
episode | number |
mapping_generation | number |
version | number | null |
signatures | Record<string, string | null> |
decision | ViewMappingReuseDecision |
candidates | { transform_id: string; verdict: string; reason: string; exact_paths: string[]; present_null_paths: string[]; absent_paths: string[]; incompatible_paths: string[]; substitution_paths: string[]; unknown_paths: string[]; bindings: Record<...>; }[] |
Waiting Shape Hint Model
Fields
Field | Type | Description |
|---|---|---|
question | string | |
reason | string | |
paths | string[] | Verified JSON bracket paths such as $["account"]["id"], with literal key characters escaped. |
requested_at | string | |
mapping_generation | number | |
view_id | string | |
deferral_id | string | |
episode | number | |
transform_id | string |
List Views
Endpoint
Retrieve a list of views for a project.
/v1/projects/:project_id/views Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
Query Parameters
Field | Type | Description |
|---|---|---|
order_by | string | Field the results are sorted by. Defaults to "created_at". Accepted values: "created_at","name","updated_at". |
project_id | string | Return only views in this project. |
collection_id | string | Return only views reading from this collection. |
parent_view_id | string | Return only views derived from this view. |
deleted_at | NullableDateFilter | Filter on deletion state. Soft-deleted views are excluded unless you ask for them. |
limit | number | Defaults to 25. Minimum: 1. Maximum: 200. |
after | string | Cursor from pagination.next_cursor of a previous response. Returns the resources after that page. |
before | string | Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page. |
sort | string | Defaults to "asc". Accepted values: "asc","desc". |
Response
{
message: string;
data: View[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} Retrieve View
Endpoint
Retrieve a single view.
/v1/projects/:project_id/views/:view_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Response
{
message: string;
data: View;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Create View
Endpoint
Create a view: a transform over one collection or view, or a join of a base view with lookups.
/v1/projects/:project_id/views Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
type | | Optional | How the view's records are produced: transform reads one collection or view through a script; join starts from a base view and attaches lookup rows. Fixed at creation. Defaults to "transform". |
name | string | Required | Name for the view. Minimum length: 1. Maximum length: 128. |
output_schema | object[] | Optional | The fields this view produces. Can be left until transforms define it. |
output_schema[].name | string | Required | Field name as it appears on the view's records. Minimum length: 1. Maximum length: 128. |
output_schema[].type | string | Required | Value type the field holds. Accepted values: "string","number","boolean","date","array","null". |
output_schema[].description | string | Optional | What the field means. Used as guidance when a transform script is generated. Maximum length: 512. |
hint | string | null | Optional | Instructions the generator cannot infer from field names alone, such as a formatting rule or a business threshold. |
mapping_policy | object | Optional | |
mapping_policy.nullable_inputs | string[] | Optional | Read paths explicitly permitted to be null. |
mapping_policy.fallback_groups | string[][] | Optional | Approved ordered fallback read paths. |
mapping_policy.output_bindings | object | Optional | Required source path segments for each output binding. |
mapping_policy.allow_drops | boolean | Optional | Allow a validated mapping to emit no output for a record. |
display_fields | object | Optional | Which field labels which in charts: each key is a field of the view, its value the view field whose value names it, such as { "user_id": "user_name" }. A key set to null is removed; on update, keys left out keep their value. |
project_id | string | Optional | Project ID. Optional when using the /projects/:project/views route. |
collection_id | string | Optional | Collection to derive from, when reading raw ingested records. |
parent_view_id | string | Optional | View to derive from, when deriving from a view. |
base_view_id | string | Optional | View every output record of a join starts from. Minimum length: 1. |
joins | object[] | Optional | Views joined onto the base view, each with its own match fields. |
joins[].lookup_view_id | string | Required | View this clause looks values up in. Minimum length: 1. |
joins[].alias | string | Required | Name this clause's fields are addressed by in the transform script. Minimum length: 1. Maximum length: 64. |
joins[].join_type | string | Optional | How unmatched base records are handled. left keeps them with empty lookup fields, inner drops them. Defaults to "left". Accepted values: "left","inner". |
joins[].base_field | string | Required | Field on the base view to match on. Minimum length: 1. Maximum length: 256. |
joins[].lookup_field | string | Required | Field on the lookup view to match against. Minimum length: 1. Maximum length: 256. |
joins[].match_strategy | string | Optional | Which lookup record wins when several match. latest keeps the newest record timestamp and is the only supported value today. Defaults to "latest". Accepted values: "latest". |
joins[].priority | integer | Optional | Order this clause is applied in. Lower runs first. Defaults to 0. Minimum: 0. |
transform_script | string | Optional | TGL transform script. When set, the view skips automatic TGL generation. Minimum length: 1. Maximum length: 65536. |
transform_mode | | Optional | How a new schema version gets its script. auto reuses a compatible script of the view or generates one; manual reuses a compatible script or waits for you to write one; explicit takes only the script you set on that version, and nothing is reused or generated. Defaults to auto. |
Response
{
message: string;
data: View;
status: 201;
error: null;
pagination: null;
endpoint: string;
} Update View
Endpoint
Update a view's name or output schema.
/v1/projects/:project_id/views/:view_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
mapping_policy | object | Optional | |
mapping_policy.nullable_inputs | string[] | Optional | Read paths explicitly permitted to be null. |
mapping_policy.fallback_groups | string[][] | Optional | Approved ordered fallback read paths. |
mapping_policy.output_bindings | object | Optional | Required source path segments for each output binding. |
mapping_policy.allow_drops | boolean | Optional | Allow a validated mapping to emit no output for a record. |
name | string | Optional | Name for the view. Minimum length: 1. Maximum length: 128. |
output_schema | object[] | Optional | The fields this view produces. Can be left until transforms define it. |
output_schema[].name | string | Required | Field name as it appears on the view's records. Minimum length: 1. Maximum length: 128. |
output_schema[].type | string | Required | Value type the field holds. Accepted values: "string","number","boolean","date","array","null". |
output_schema[].description | string | Optional | What the field means. Used as guidance when a transform script is generated. Maximum length: 512. |
hint | string | null | Optional | Instructions the generator cannot infer from field names alone, such as a formatting rule or a business threshold. |
display_fields | object | Optional | Which field labels which in charts: each key is a field of the view, its value the view field whose value names it, such as { "user_id": "user_name" }. A key set to null is removed; on update, keys left out keep their value. |
transform_mode | | Optional | How a new schema version gets its script. auto reuses a compatible script of the view or generates one; manual reuses a compatible script or waits for you to write one; explicit takes only the script you set on that version, and nothing is reused or generated. |
view_transform_id | string | Optional | Which transform adopts the schema versions still waiting for a script when switching transform_mode to manual. Required only when the view has more than one distinct transform script. |
deleted_at | null | Optional | Send null to restore a view that is scheduled for deletion. The deletion date itself is set by the delete endpoint and cannot be written here. |
Response
{
message: string;
data: View;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Delete View
Endpoint
Delete a view and every view derived from it.
/v1/projects/:project_id/views/:view_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Response
{
message: string;
data: View;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Force Delete View
Endpoint
Delete a view permanently, without waiting out its restore window.
/v1/projects/:project_id/views/:view_id/force Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Response
{
message: string;
data: null;
status: 200;
error: null;
pagination: null;
endpoint: string;
} List View Records
Endpoint
Retrieve the transformed records a view has produced.
/v1/projects/:project_id/views/:view_id/records Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Query Parameters
Field | Type | Description |
|---|---|---|
limit | number | Maximum number of items to return. Defaults to 25. Minimum: 1. Maximum: 200. |
after | string | Cursor from pagination.next_cursor of a previous response. Returns the resources after that page. |
before | string | Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page. |
sort | string | Sort direction for the result set. Defaults to "desc". Accepted values: "asc","desc". |
Response
{
message: string;
data: ViewRecord[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} List Waiting Shapes
Endpoint
Retrieve the event shapes a view has deferred because no transform serves them yet.
/v1/projects/:project_id/views/:view_id/deferrals Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Query Parameters
Field | Type | Description |
|---|---|---|
resolved | string | Filter by resolution. false returns only shapes still waiting. Accepted values: "true","false". |
order_by | string | Sort field. Defaults to last_deferred_at. Accepted values: "first_deferred_at","last_deferred_at". |
limit | number | Maximum number of items to return. Defaults to 25. Minimum: 1. Maximum: 200. |
after | string | Cursor from pagination.next_cursor of a previous response. Returns the resources after that page. |
before | string | Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page. |
sort | string | Sort direction for the result set. Defaults to "desc". Accepted values: "asc","desc". |
Response
{
message: string;
data: ViewShapeDeferral[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} Inspect Waiting Shape
Endpoint
Inspect structural differences and candidate output bindings for a waiting shape.
/v1/projects/:project_id/views/:view_id/deferrals/:deferral_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
deferral_id | string | Unique identifier of the deferral. |
Response
{
message: string;
data: ViewShapeInspection;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Retrieve Waiting Shape Hint
Endpoint
Retrieve the model's current binding question for a waiting shape.
/v1/projects/:project_id/views/:view_id/deferrals/:deferral_id/hint Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
deferral_id | string | Unique identifier of the deferral. |
Response 200 (1)
{
message: string;
data: null;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Response 200 (2)
{
message: string;
data: ViewPendingHint;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Decide Waiting Shape
Endpoint
Resolve the next action for one view and schema version.
/v1/projects/:project_id/views/:view_id/deferrals/:deferral_id/decision Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
deferral_id | string | Unique identifier of the deferral. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
episode | integer | Required | The deferral episode shown when the decision was inspected. Minimum: 1. |
action | string | Required | Authorize a bounded authoring attempt, answer a hint, or exclude this exact version in this view. Accepted values: "author","hint","exclude". |
mapping_generation | integer | Required | The mapping generation shown when the decision was inspected. Minimum: 1. |
hint | string | Optional | Answer to the model's binding question. Minimum length: 1. Maximum length: 4096. |
hint_requested_at | | Optional | Exact requested_at of the pending hint being answered. |
hint_transform_id | string | Optional | Transform that owns the pending hint being answered. Minimum length: 1. Maximum length: 32. |
reason | string | Optional | Required audit reason for an exclusion. Minimum length: 1. Maximum length: 2000. |
mapping_policy | object | Optional | Explicit null, fallback, drop, and source-binding rules. |
mapping_policy.nullable_inputs | string[] | Optional | Read paths explicitly permitted to be null. |
mapping_policy.fallback_groups | string[][] | Optional | Approved ordered fallback read paths. |
mapping_policy.output_bindings | object | Optional | Required source path segments for each output binding. |
mapping_policy.allow_drops | boolean | Optional | Allow a validated mapping to emit no output for a record. |
Response
{
message: string;
data: null;
status: 200;
error: null;
pagination: null;
endpoint: string;
} List View Transforms
Endpoint
Retrieve a list of a view's transforms.
/v1/projects/:project_id/views/:view_id/transforms Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Query Parameters
Field | Type | Description |
|---|---|---|
order_by | string | Field the results are sorted by. Creation order matches schema version order. Defaults to "created_at". Accepted values: "created_at","updated_at". |
status | | Return only transforms in this state. |
limit | number | Defaults to 25. Minimum: 1. Maximum: 200. |
after | string | Cursor from pagination.next_cursor of a previous response. Returns the resources after that page. |
before | string | Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page. |
sort | string | Defaults to "asc". Accepted values: "asc","desc". |
Response
{
message: string;
data: ViewTransform[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} Retrieve View Transform
Endpoint
Retrieve a single transform.
/v1/projects/:project_id/views/:view_id/transforms/:transform_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
transform_id | string | Unique identifier of the transform. |
Response
{
message: string;
data: ViewTransform;
status: 200;
error: null;
pagination: null;
endpoint: string;
} List View Versions
Endpoint
Retrieve a list of the schema versions a view covers.
/v1/projects/:project_id/views/:view_id/versions Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Query Parameters
Field | Type | Description |
|---|---|---|
order_by | string | Field the results are sorted by. Defaults to "version". Accepted values: "version". |
status | | Return only versions whose transform is in this state. |
script_hash | string | Return only versions served by this script. Take the value from a version's row. Minimum length: 64. Maximum length: 64. |
limit | number | Maximum number of items to return. Defaults to 25. Minimum: 1. Maximum: 200. |
after | string | Cursor from pagination.next_cursor of a previous response. Returns the resources after that page. |
before | string | Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page. |
sort | string | Sort direction for the result set. Defaults to "desc". Accepted values: "asc","desc". |
Response
{
message: string;
data: ViewVersion[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} Retrieve View Version
Endpoint
Retrieve one schema version a view covers.
/v1/projects/:project_id/views/:view_id/versions/:version_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
version_id | integer | The schema version number: the version a view version carries. |
Response
{
message: string;
data: ViewVersion;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Update View Version
Endpoint
Exclude one settled schema version from a view.
/v1/projects/:project_id/views/:view_id/versions/:version_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
version_id | integer | The schema version number: the version a view version carries. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
is_excluded | boolean | Required | Set to true to exclude this schema version from the view: its records are left out of the view, now and in the future. |
exclusion_reason | string | Optional | Why the version is excluded, kept with the exclusion for whoever reads it later. Minimum length: 1. Maximum length: 2000. |
Response
{
message: string;
data: ViewVersion;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Create View Transform
Endpoint
Add a transform that maps incoming records into the view's output schema.
/v1/projects/:project_id/views/:view_id/transforms Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
collection_schema_version | integer | null | Optional | Collection schema version this transform covers. Null for view-to-view transforms. |
transform_script | string | Optional | TGL transform script. Omit to have one generated. Minimum length: 1. Maximum length: 65536. |
Response
{
message: string;
data: ViewTransform;
status: 201;
error: null;
pagination: null;
endpoint: string;
} Update View Transform
Endpoint
Update a transform's script.
/v1/projects/:project_id/views/:view_id/transforms/:transform_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
transform_id | string | Unique identifier of the transform. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
transform_script | string | Optional | TGL transform script. To clear and regenerate, use the regenerate endpoint instead. Minimum length: 1. Maximum length: 65536. |
conflict_resolution | string | Optional | How conflicting schema versions are handled when a script edit fans out. Defaults to "strand". Accepted values: "strand","keep". |
dry_run | boolean | Optional | Preview the edit: returns the per-version verdict report without changing anything. Defaults to false. |
preview_token | string | Optional | The edit_report.preview_token from this edit's dry run. Required to save: it pins the save to the set of schema versions the preview reported on, so a version assigned or reassigned in between is rejected instead of silently included. Minimum length: 1. Maximum length: 128. |
Response 200 (1)
{
message: string;
data: ViewTransform & { edit_report: { script_hash: string | null; version_verdicts: { collection_schema_version_id: string; version: number; verdict: "compatible" | "conflict"; action: "updated" | "kept" | "stranded"; null_paths: string[]; }[]; preview_token?: string | undefined; } };
status: 200;
error: null;
pagination: null;
endpoint: string;
} Additional Response Fields
Field | Type |
|---|---|
edit_report | { script_hash: string | null; version_verdicts: { collection_schema_version_id: string; version: number; verdict: "compatible" | "conflict"; action: "updated" | "kept" | "stranded"; null_paths: string[]; }[]; preview_token?: string | undefined; } |
Response 200 (2)
{
message: string;
data: ViewTransform & { edit_report: { script_hash: string | null; version_verdicts: never[]; } };
status: 200;
error: null;
pagination: null;
endpoint: string;
} Additional Response Fields
Field | Type |
|---|---|
edit_report | { script_hash: string | null; version_verdicts: never[]; } |
Generate View Transform Script
Endpoint
Queue TGL generation for a transform from the view's input and output schemas.
/v1/projects/:project_id/views/:view_id/transforms/:transform_id/generate Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
transform_id | string | Unique identifier of the transform. |
Response
{
message: string;
data: null;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Re-backfill View Transform
Endpoint
Re-run a transform over every record the view has already read.
/v1/projects/:project_id/views/:view_id/transforms/:transform_id/rebackfill Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
transform_id | string | Unique identifier of the transform. |
Response
{
message: string;
data: ViewTransform;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Regenerate View
Endpoint
Replace a view's output schema and queue every transform to be regenerated against it.
/v1/projects/:project_id/views/:view_id/regenerate Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
output_schema | object[] | Optional | The fields the view should produce. Omit to regenerate against the current schema. |
output_schema[].name | string | Required | Field name as it appears on the view's records. Minimum length: 1. Maximum length: 128. |
output_schema[].type | string | Required | Value type the field holds. Accepted values: "string","number","boolean","date","array","null". |
output_schema[].description | string | Optional | What the field means. Used as guidance when a transform script is generated. Maximum length: 512. |
hint | string | null | Optional | Instructions the generator cannot infer from field names alone, such as a formatting rule or a business threshold. |
Response
{
message: string;
data: View;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Delete View Transform
Endpoint
Delete a transform from a view.
/v1/projects/:project_id/views/:view_id/transforms/:transform_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
view_id | string | Unique identifier of the view. |
transform_id | string | Unique identifier of the transform. |
Response
{
message: string;
data: null;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Referenced Types
NullableDateFilter
Nullable date filters accept everything a date filter accepts, plus null to match records where the field is unset and not:null to match records where it is set.
ISODateString
An ISO 8601 date-time string returned at the JSON API boundary.
ViewType
ViewTransformMode
ViewStatus
ViewJoinStatus
JoinLookupStatus
ViewTransformStatus
ViewTransformBackfillStatus
ViewShapeDeferralReason
What unblocks a waiting shape.