Request
- Base URL: https://us.posthog.com
- URL: https://us.posthog.com/api/projects/{project_id}/batch_exports/
- Auth: HTTP bearer
Path parameters
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
Human-readable name for the batch export.
- events - Events
- persons - Persons
- sessions - Sessions
- hogql - Hogql
- hour - hour
- day - day
- week - week
- every 5 minutes - every 5 minutes
- every 15 minutes - every 15 minutes
Whether the batch export is paused.
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'.
IANA timezone name (e.g. 'America/New_York', 'Europe/London', 'UTC') controlling daily and weekly interval boundaries.
Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday).
Hour-of-day offset (0-23) for daily and weekly intervals.
Response
The team this belongs to.
A human-readable name for this BatchExport.
- events - Events
- persons - Persons
- sessions - Sessions
- hogql - Hogql
- hour - hour
- day - day
- week - week
- every 5 minutes - every 5 minutes
- every 15 minutes - every 15 minutes
Whether this BatchExport is paused or not.
The timestamp at which this BatchExport was created.
The timestamp at which this BatchExport was last updated.
The timestamp at which this BatchExport was last paused.
Time before which any Batch Export runs won't be triggered.
Time after which any Batch Export runs won't be triggered.
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'.
Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday). Only valid when interval is 'week'.
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.