Warehouse
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
POST | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
POST |
List all environments warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:readQuery parameters
- limitinteger
- offsetinteger
- searchstring
Response
Example request
GET /api /environments /:environment_id /warehouse_tablesExample response
Status 200
Create environments warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writeRequest parameters
- deletedbooleannull
- namestring
- format
- url_patternstring
- credential
- optionsobject
Response
Example request
POST /api /environments /:environment_id /warehouse_tablesExample response
Status 201
Retrieve environments warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:readPath parameters
- idstring
Response
Example request
GET /api /environments /:environment_id /warehouse_tables /:idExample response
Status 200
Update environments warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Request parameters
- deletedbooleannull
- namestring
- format
- url_patternstring
- credential
- optionsobject
Response
Example request
PATCH /api /environments /:environment_id /warehouse_tables /:idExample response
Status 200
Delete environments warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Example request
DELETE /api /environments /:environment_id /warehouse_tables /:idExample response
Status 204 No response body
Create environments warehouse tables refresh schema
Re-introspect a self-managed (manually linked) warehouse table's schema from its underlying source files and overwrite its stored column list. Use when the source schema has evolved (e.g. new columns in the underlying Delta/Parquet/CSV files) but queries still can't see the new columns, because PostHog serves a cached column snapshot until the table is refreshed. Not for tables managed by an external data source sync — those refresh on their own schedule.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Example request
POST /api /environments /:environment_id /warehouse_tables /:id /refresh_schemaExample response
Status 200 Schema refreshed from the table's underlying source
Create environments warehouse tables update schema
Create, Read, Update and Delete Warehouse Tables.
Path parameters
- idstring
Request parameters
- deletedbooleannull
- namestring
- format
- url_patternstring
- credential
- optionsobject
Example request
POST /api /environments /:environment_id /warehouse_tables /:id /update_schemaExample response
Status 200 No response body
Create environments warehouse tables file
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writeExample request
Example response
Status 200 No response body
List all warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:readQuery parameters
- limitinteger
- offsetinteger
- searchstring
Response
Example request
GET /api /projects /:project_id /warehouse_tablesExample response
Status 200
Create warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writeRequest parameters
- deletedbooleannull
- namestring
- format
- url_patternstring
- credential
- optionsobject
Response
Example request
POST /api /projects /:project_id /warehouse_tablesExample response
Status 201
Retrieve warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /warehouse_tables /:idExample response
Status 200
Update warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Request parameters
- deletedbooleannull
- namestring
- format
- url_patternstring
- credential
- optionsobject
Response
Example request
PATCH /api /projects /:project_id /warehouse_tables /:idExample response
Status 200
Delete warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /warehouse_tables /:idExample response
Status 204 No response body
Create warehouse tables refresh schema
Re-introspect a self-managed (manually linked) warehouse table's schema from its underlying source files and overwrite its stored column list. Use when the source schema has evolved (e.g. new columns in the underlying Delta/Parquet/CSV files) but queries still can't see the new columns, because PostHog serves a cached column snapshot until the table is refreshed. Not for tables managed by an external data source sync — those refresh on their own schedule.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Example request
POST /api /projects /:project_id /warehouse_tables /:id /refresh_schemaExample response
Status 200 Schema refreshed from the table's underlying source
Create warehouse tables update schema
Create, Read, Update and Delete Warehouse Tables.
Path parameters
- idstring
Request parameters
- deletedbooleannull
- namestring
- format
- url_patternstring
- credential
- optionsobject
Example request
POST /api /projects /:project_id /warehouse_tables /:id /update_schemaExample response
Status 200 No response body
Create warehouse tables file
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:write