Batch
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
GET | |
POST | |
POST | |
POST | |
POST | |
GET |
Retrieve batch exports runs
Required API key scopes
batch_export:readPath parameters
- batch_export_idstring
The BatchExport this run belongs to.
- idstring
A UUID string identifying this batch export run.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Response
Example request
GET /api /projects /:project_id /batch_exports /:batch_export_id /runs /:idExample response
Status 200
Create batch exports runs cancel
Cancel a batch export run.
Required API key scopes
batch_export:writePath parameters
- batch_export_idstring
The BatchExport this run belongs to.
- idstring
A UUID string identifying this batch export run.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- status
The status of this run.
Cancelled- CancelledCompleted- CompletedContinuedAsNew- Continued As NewFailed- FailedFailedRetryable- Failed RetryableFailedBilling- Failed BillingTerminated- TerminatedTimedOut- TimedoutRunning- RunningStarting- Starting
- records_completedinteger
The number of records that have been exported.
- latest_errorstring
The latest error that occurred during this run.
- data_interval_startstring
The start of the data interval.
- data_interval_endstring
The end of the data interval.
- cursorstring
An opaque cursor that may be used to resume.
- finished_atstring
The timestamp at which this BatchExportRun finished, successfully or not.
- records_total_countinteger
The total count of records that should be exported in this BatchExportRun.
- bytes_exportedinteger
The number of bytes that have been exported in this BatchExportRun.
- backfillstring
The backfill this run belongs to.
Example request
POST /api /projects /:project_id /batch_exports /:batch_export_id /runs /:id /cancelExample response
Status 200 No response body
Retrieve batch exports runs logs
Path parameters
- batch_export_idstring
The BatchExport this run belongs to.
- idstring
A UUID string identifying this batch export run.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Example request
GET /api /projects /:project_id /batch_exports /:batch_export_id /runs /:id /logsExample response
Status 200 No response body
Create batch exports runs retry
Retry a batch export run.
We use the same underlying mechanism as when backfilling a batch export, as retrying a run is the same as backfilling one run.
Required API key scopes
batch_export:writePath parameters
- batch_export_idstring
The BatchExport this run belongs to.
- idstring
A UUID string identifying this batch export run.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- status
The status of this run.
Cancelled- CancelledCompleted- CompletedContinuedAsNew- Continued As NewFailed- FailedFailedRetryable- Failed RetryableFailedBilling- Failed BillingTerminated- TerminatedTimedOut- TimedoutRunning- RunningStarting- Starting
- records_completedinteger
The number of records that have been exported.
- latest_errorstring
The latest error that occurred during this run.
- data_interval_startstring
The start of the data interval.
- data_interval_endstring
The end of the data interval.
- cursorstring
An opaque cursor that may be used to resume.
- finished_atstring
The timestamp at which this BatchExportRun finished, successfully or not.
- records_total_countinteger
The total count of records that should be exported in this BatchExportRun.
- bytes_exportedinteger
The number of bytes that have been exported in this BatchExportRun.
- backfillstring
The backfill this run belongs to.
Example request
POST /api /projects /:project_id /batch_exports /:batch_export_id /runs /:id /retryExample response
Status 200 No response body
Retrieve batch exports retrieve
Required API key scopes
batch_export:readPath parameters
- idstring
A UUID string identifying this batch export.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Response
Example request
GET /api /projects /:project_id /batch_exports /:idExample response
Status 200
Update batch exports update
Required API key scopes
batch_export:writePath parameters
- idstring
A UUID string identifying this batch export.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- model
Which model this BatchExport is exporting.
events- Eventspersons- Personssessions- Sessions
- destination
- interval
- pausedboolean
Whether this BatchExport is paused or not.
- last_paused_atstring
The timestamp at which this BatchExport was last paused.
- start_atstring
Time before which any Batch Export runs won't be triggered.
- end_atstring
Time after which any Batch Export runs won't be triggered.
- hogql_querystring
- filters
Response
Example request
PATCH /api /projects /:project_id /batch_exports /:idExample response
Status 200
Delete batch exports destroy
Required API key scopes
batch_export:writePath parameters
- idstring
A UUID string identifying this batch export.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Example request
DELETE /api /projects /:project_id /batch_exports /:idExample response
Status 204 No response body
Create batch exports backfill create
Trigger a backfill for a BatchExport.
Note: This endpoint is deprecated. Please use POST /batch_exports/<id>/backfills/ instead.
Required API key scopes
batch_export:writePath parameters
- idstring
A UUID string identifying this batch export.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- model
Which model this BatchExport is exporting.
events- Eventspersons- Personssessions- Sessions
- destination
- interval
- pausedboolean
Whether this BatchExport is paused or not.
- last_paused_atstring
The timestamp at which this BatchExport was last paused.
- start_atstring
Time before which any Batch Export runs won't be triggered.
- end_atstring
Time after which any Batch Export runs won't be triggered.
- hogql_querystring
- filters
Example request
POST /api /projects /:project_id /batch_exports /:id /backfillExample response
Status 200 No response body
Retrieve batch exports logs retrieve
Path parameters
- idstring
A UUID string identifying this batch export.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Example request
GET /api /projects /:project_id /batch_exports /:id /logsExample response
Status 200 No response body
Create batch exports pause create
Pause a BatchExport.
Required API key scopes
batch_export:writePath parameters
- idstring
A UUID string identifying this batch export.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- model
Which model this BatchExport is exporting.
events- Eventspersons- Personssessions- Sessions
- destination
- interval
- pausedboolean
Whether this BatchExport is paused or not.
- last_paused_atstring
The timestamp at which this BatchExport was last paused.
- start_atstring
Time before which any Batch Export runs won't be triggered.
- end_atstring
Time after which any Batch Export runs won't be triggered.
- hogql_querystring
- filters
Example request
POST /api /projects /:project_id /batch_exports /:id /pauseExample response
Status 200 No response body
Create batch exports run test step create
Required API key scopes
INTERNALPath parameters
- idstring
A UUID string identifying this batch export.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- model
Which model this BatchExport is exporting.
events- Eventspersons- Personssessions- Sessions
- destination
- interval
- pausedboolean
Whether this BatchExport is paused or not.
- last_paused_atstring
The timestamp at which this BatchExport was last paused.
- start_atstring
Time before which any Batch Export runs won't be triggered.
- end_atstring
Time after which any Batch Export runs won't be triggered.
- hogql_querystring
- filters
Example request
POST /api /projects /:project_id /batch_exports /:id /run_test_stepExample response
Status 200 No response body
Create batch exports unpause create
Unpause a BatchExport.
Required API key scopes
batch_export:writePath parameters
- idstring
A UUID string identifying this batch export.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- model
Which model this BatchExport is exporting.
events- Eventspersons- Personssessions- Sessions
- destination
- interval
- pausedboolean
Whether this BatchExport is paused or not.
- last_paused_atstring
The timestamp at which this BatchExport was last paused.
- start_atstring
Time before which any Batch Export runs won't be triggered.
- end_atstring
Time after which any Batch Export runs won't be triggered.
- hogql_querystring
- filters
Example request
POST /api /projects /:project_id /batch_exports /:id /unpauseExample response
Status 200 No response body
Create batch exports run test step new create
Required API key scopes
INTERNALPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- model
Which model this BatchExport is exporting.
events- Eventspersons- Personssessions- Sessions
- destination
- interval
- pausedboolean
Whether this BatchExport is paused or not.
- last_paused_atstring
The timestamp at which this BatchExport was last paused.
- start_atstring
Time before which any Batch Export runs won't be triggered.
- end_atstring
Time after which any Batch Export runs won't be triggered.
- hogql_querystring
- filters
Example request
POST /api /projects /:project_id /batch_exports /run_test_step_newExample response
Status 200 No response body
Retrieve batch exports test retrieve
Required API key scopes
INTERNALPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Example request
GET /api /projects /:project_id /batch_exports /test