provider external_data_schemas POST /api/environments/{environment_id}/external_data_schemas/{id}/incremental_fields/
@utdk/posthog /api/environments/{environment_id}/external_data_schemas/{id}/incremental_fields/
environments_external_data_schemas_incremental_fields_create
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string
id path required
A UUID string identifying this external data schema.
string

Try it

Authentication
Configure credentials for PostHog API
environmentsExternalDataSchemasIncrementalFieldsCreate
POST/api/environments/{environment_id}/external_data_schemas/{id}/incremental_fields/

Parameters

required

Deprecated. Use /api/projects/{project_id}/ instead.

required

A UUID string identifying this external data schema.

Input

required
required
required
required
required
required

The latest error that occurred when syncing this schema.

required
required

Sync strategy: incremental, full_refresh, append, cdc, or xmin. * `full_refresh` - full_refresh * `incremental` - incremental * `append` - append * `webhook` - webhook * `cdc` - cdc * `xmin` - xmin

Column name used to track sync progress.

Data type of the incremental field. * `integer` - integer * `numeric` - numeric * `datetime` - datetime * `date` - date * `timestamp` - timestamp * `objectid` - objectid * `xid` - xid

Seconds to subtract from the stored incremental watermark at sync time, so each incremental run re-reads a rolling overlap window and catches late or backdated rows. Applies to timestamp/date incremental fields only. The stored watermark is unchanged. Maximum 5184000 (60 days).

How often to sync. * `never` - never * `1min` - 1min * `5min` - 5min * `15min` - 15min * `30min` - 30min * `1hour` - 1hour * `6hour` - 6hour * `12hour` - 12hour * `24hour` - 24hour * `7day` - 7day * `30day` - 30day

UTC time of day to run the sync (HH:MM:SS).

required

Column names for primary key deduplication.

For CDC syncs: consolidated, cdc_only, or both. * `consolidated` - consolidated * `cdc_only` - cdc_only * `both` - both

Names of source columns to sync. `null` (default) syncs all columns. Primary-key columns and the active incremental field are always retained, even if not listed here.

Predicates ANDed onto the source query so only matching rows sync. Each is `{column, operator, value}`; `null`/empty (default) syncs all rows. The operator must be one of `> >= < <= = != IN "NOT IN"` and the value must match the column's type (for `IN`/`NOT IN`, a comma-separated list like `1, 2, 3` or `'a','b'`). Applied on the next sync — not retroactive to already-synced rows.

required

Column metadata (name, data type, nullable) for this schema. For SQL sources this is the source-side schema discovered via `refresh_schemas`; for other sources (and once synced) it falls back to the synced table's columns. Empty only before the first successful sync/refresh.

required

Lightweight parent-source summary (id, source_type, column-selection support, the requesting user's access level). Only populated on the single-schema retrieve endpoint — `null` elsewhere — so read-only views can render without fetching the full source and all its schemas.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.environmentsExternalDataSchemasIncrementalFieldsCreate()