warehouse_expressions

Create, read, update and delete saved HogQL expressions that appear as virtual fields on tables.

patch/api/projects/{project_id}/warehouse_expressions/{id}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/warehouse_expressions/{id}/
  • Auth: HTTP bearer

Path parameters

idstring uuid required

A UUID string identifying this data warehouse expression.

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

idstring uuid
deletedboolean nullable

Whether this expression has been soft-deleted.

created_atstring date-time
table_namestring

Name of the table the expression field is added to, for example events.

field_namestring

Name of the virtual field the expression is exposed as. Letters, numbers, underscores and $ only, starting with a letter, underscore or $. Must not clash with an existing field on the table.

expressionstring

HogQL expression evaluated in the context of the table, for example properties.$browser or lower(email).

connection_idstring uuid nullable

ExternalDataSource id to scope the expression to that connection's direct-query database. Null applies it to the default warehouse database.

Response

idstring uuid required
deletedboolean nullable

Whether this expression has been soft-deleted.

created_atstring date-time required
table_namestring required

Name of the table the expression field is added to, for example events.

field_namestring required

Name of the virtual field the expression is exposed as. Letters, numbers, underscores and $ only, starting with a letter, underscore or $. Must not clash with an existing field on the table.

expressionstring required

HogQL expression evaluated in the context of the table, for example properties.$browser or lower(email).

connection_idstring uuid nullable

ExternalDataSource id to scope the expression to that connection's direct-query database. Null applies it to the default warehouse database.

Changes

No recorded changes to this operation across all 1 revision of this API.