batch_exports
batch_exports

put/api/projects/{project_id}/batch_exports/{id}/

Request

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

Path parameters

idstring uuid required

A UUID string identifying this batch export.

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

namestring required

Human-readable name for the batch export.

model'events' | 'persons' | 'sessions' | 'hogql'
  • events - Events
  • persons - Persons
  • sessions - Sessions
  • hogql - Hogql
interval'hour' | 'day' | 'week' | 'every 5 minutes' | 'every 15 minutes' required
  • hour - hour
  • day - day
  • week - week
  • every 5 minutes - every 5 minutes
  • every 15 minutes - every 15 minutes
pausedboolean

Whether the batch export is paused.

hogql_querystring nullable

HogQL SELECT query. With model 'hogql', its results are the data exported by every run. The query may reference the {data_interval_start} and {data_interval_end} placeholders, replaced with each run's data interval bounds, for example: WHERE timestamp >= {data_interval_start} AND timestamp < {data_interval_end}. Without them every run exports all rows the query returns. Required when model is 'hogql'.

filtersunknown
timezonestring nullable

IANA timezone name (e.g. 'America/New_York', 'Europe/London', 'UTC') controlling daily and weekly interval boundaries.

offset_dayinteger nullable

Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday).

offset_hourinteger nullable

Hour-of-day offset (0-23) for daily and weekly intervals.

Response

idstring uuid required
team_idinteger required

The team this belongs to.

namestring required

A human-readable name for this BatchExport.

model'events' | 'persons' | 'sessions' | 'hogql'
  • events - Events
  • persons - Persons
  • sessions - Sessions
  • hogql - Hogql
interval'hour' | 'day' | 'week' | 'every 5 minutes' | 'every 15 minutes' required
  • hour - hour
  • day - day
  • week - week
  • every 5 minutes - every 5 minutes
  • every 15 minutes - every 15 minutes
pausedboolean

Whether this BatchExport is paused or not.

created_atstring date-time required

The timestamp at which this BatchExport was created.

last_updated_atstring date-time required

The timestamp at which this BatchExport was last updated.

last_paused_atstring date-time nullable

The timestamp at which this BatchExport was last paused.

start_atstring date-time nullable

Time before which any Batch Export runs won't be triggered.

end_atstring date-time nullable

Time after which any Batch Export runs won't be triggered.

hogql_querystring nullable

HogQL SELECT query. With model 'hogql', its results are the data exported by every run. The query may reference the {data_interval_start} and {data_interval_end} placeholders, replaced with each run's data interval bounds, for example: WHERE timestamp >= {data_interval_start} AND timestamp < {data_interval_end}. Without them every run exports all rows the query returns. Required when model is 'hogql'.

schemaunknown required
filtersunknown
offset_dayinteger nullable

Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday). Only valid when interval is 'week'.

offset_hourinteger nullable

Hour-of-day offset (0-23) for daily and weekly intervals. Only valid when interval is 'day' or 'week'.

Changes

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