Environments-2
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
List all environments batch exports runs
Required API key scopes
batch_export:readPath parameters
- batch_export_idstringThe BatchExport this run belongs to. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- cursorstringThe pagination cursor value. 
- orderingstringWhich field to use when ordering the results. 
Response
Request
GET 
Response
Status 200
List all environments batch exports runs
Required API key scopes
batch_export:readPath parameters
- batch_export_idstringThe BatchExport this run belongs to. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- cursorstringThe pagination cursor value. 
- orderingstringWhich field to use when ordering the results. 
Response
Request
GET 
Response
Status 200
Retrieve environments batch exports runs
Required API key scopes
batch_export:readPath parameters
- batch_export_idstringThe BatchExport this run belongs to. 
- idstringA UUID string identifying this batch export run. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Response
Request
GET 
Response
Status 200
Retrieve environments batch exports runs
Required API key scopes
batch_export:readPath parameters
- batch_export_idstringThe BatchExport this run belongs to. 
- idstringA UUID string identifying this batch export run. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Response
Request
GET 
Response
Status 200
Create environments batch exports runs cancel
Cancel a batch export run.
Required API key scopes
batch_export:writePath parameters
- batch_export_idstringThe BatchExport this run belongs to. 
- idstringA UUID string identifying this batch export run. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- statusThe status of this run. - Cancelled- Cancelled
- Completed- Completed
- ContinuedAsNew- Continued As New
- Failed- Failed
- FailedRetryable- Failed Retryable
- Terminated- Terminated
- TimedOut- Timedout
- Running- Running
- Starting- Starting
 
- records_completedintegerThe number of records that have been exported. 
- latest_errorstringThe latest error that occurred during this run. 
- data_interval_startstringThe start of the data interval. 
- data_interval_endstringThe end of the data interval. 
- cursorstringAn opaque cursor that may be used to resume. 
- finished_atstringThe timestamp at which this BatchExportRun finished, successfully or not. 
- records_total_countintegerThe total count of records that should be exported in this BatchExportRun. 
- backfillstringThe backfill this run belongs to. 
Request
POST 
Response
Status 200 No response body
Create environments batch exports runs cancel
Cancel a batch export run.
Required API key scopes
batch_export:writePath parameters
- batch_export_idstringThe BatchExport this run belongs to. 
- idstringA UUID string identifying this batch export run. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- statusThe status of this run. - Cancelled- Cancelled
- Completed- Completed
- ContinuedAsNew- Continued As New
- Failed- Failed
- FailedRetryable- Failed Retryable
- Terminated- Terminated
- TimedOut- Timedout
- Running- Running
- Starting- Starting
 
- records_completedintegerThe number of records that have been exported. 
- latest_errorstringThe latest error that occurred during this run. 
- data_interval_startstringThe start of the data interval. 
- data_interval_endstringThe end of the data interval. 
- cursorstringAn opaque cursor that may be used to resume. 
- finished_atstringThe timestamp at which this BatchExportRun finished, successfully or not. 
- records_total_countintegerThe total count of records that should be exported in this BatchExportRun. 
- backfillstringThe backfill this run belongs to. 
Request
POST 
Response
Status 200 No response body
Retrieve environments batch exports runs logs
Path parameters
- batch_export_idstringThe BatchExport this run belongs to. 
- idstringA UUID string identifying this batch export run. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request
GET 
Response
Status 200 No response body
Retrieve environments batch exports runs logs
Path parameters
- batch_export_idstringThe BatchExport this run belongs to. 
- idstringA UUID string identifying this batch export run. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request
GET 
Response
Status 200 No response body
Create environments 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_idstringThe BatchExport this run belongs to. 
- idstringA UUID string identifying this batch export run. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- statusThe status of this run. - Cancelled- Cancelled
- Completed- Completed
- ContinuedAsNew- Continued As New
- Failed- Failed
- FailedRetryable- Failed Retryable
- Terminated- Terminated
- TimedOut- Timedout
- Running- Running
- Starting- Starting
 
- records_completedintegerThe number of records that have been exported. 
- latest_errorstringThe latest error that occurred during this run. 
- data_interval_startstringThe start of the data interval. 
- data_interval_endstringThe end of the data interval. 
- cursorstringAn opaque cursor that may be used to resume. 
- finished_atstringThe timestamp at which this BatchExportRun finished, successfully or not. 
- records_total_countintegerThe total count of records that should be exported in this BatchExportRun. 
- backfillstringThe backfill this run belongs to. 
Request
POST 
Response
Status 200 No response body
Create environments 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_idstringThe BatchExport this run belongs to. 
- idstringA UUID string identifying this batch export run. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- statusThe status of this run. - Cancelled- Cancelled
- Completed- Completed
- ContinuedAsNew- Continued As New
- Failed- Failed
- FailedRetryable- Failed Retryable
- Terminated- Terminated
- TimedOut- Timedout
- Running- Running
- Starting- Starting
 
- records_completedintegerThe number of records that have been exported. 
- latest_errorstringThe latest error that occurred during this run. 
- data_interval_startstringThe start of the data interval. 
- data_interval_endstringThe end of the data interval. 
- cursorstringAn opaque cursor that may be used to resume. 
- finished_atstringThe timestamp at which this BatchExportRun finished, successfully or not. 
- records_total_countintegerThe total count of records that should be exported in this BatchExportRun. 
- backfillstringThe backfill this run belongs to. 
Request
POST 
Response
Status 200 No response body
Retrieve environments batch exports
Required API key scopes
batch_export:readPath parameters
- idstringA UUID string identifying this batch export. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Response
Request
GET 
Response
Status 200
Retrieve environments batch exports
Required API key scopes
batch_export:readPath parameters
- idstringA UUID string identifying this batch export. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Response
Request
GET 
Response
Status 200
Update environments batch exports
Required API key scopes
batch_export:writePath parameters
- idstringA UUID string identifying this batch export. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- namestringA human-readable name for this BatchExport. 
- modelWhich model this BatchExport is exporting. - events- Events
- persons- Persons
- sessions- Sessions
 
- destination
- interval
- pausedbooleanWhether this BatchExport is paused or not. 
- last_paused_atstringThe timestamp at which this BatchExport was last paused. 
- start_atstringTime before which any Batch Export runs won't be triggered. 
- end_atstringTime after which any Batch Export runs won't be triggered. 
- hogql_querystring
- filters
Response
Request
PATCH 
Response
Status 200
Update environments batch exports
Required API key scopes
batch_export:writePath parameters
- idstringA UUID string identifying this batch export. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- namestringA human-readable name for this BatchExport. 
- modelWhich model this BatchExport is exporting. - events- Events
- persons- Persons
- sessions- Sessions
 
- destination
- interval
- pausedbooleanWhether this BatchExport is paused or not. 
- last_paused_atstringThe timestamp at which this BatchExport was last paused. 
- start_atstringTime before which any Batch Export runs won't be triggered. 
- end_atstringTime after which any Batch Export runs won't be triggered. 
- hogql_querystring
- filters
Response
Request
PATCH 
Response
Status 200
Delete environments batch exports
Required API key scopes
batch_export:writePath parameters
- idstringA UUID string identifying this batch export. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request
DELETE 
Response
Status 204 No response body
Delete environments batch exports
Required API key scopes
batch_export:writePath parameters
- idstringA UUID string identifying this batch export. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request
DELETE 
Response
Status 204 No response body
Create environments batch exports backfill
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
- idstringA UUID string identifying this batch export. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- namestringA human-readable name for this BatchExport. 
- modelWhich model this BatchExport is exporting. - events- Events
- persons- Persons
- sessions- Sessions
 
- destination
- interval
- pausedbooleanWhether this BatchExport is paused or not. 
- last_paused_atstringThe timestamp at which this BatchExport was last paused. 
- start_atstringTime before which any Batch Export runs won't be triggered. 
- end_atstringTime after which any Batch Export runs won't be triggered. 
- hogql_querystring
- filters
Request
POST 
Response
Status 200 No response body
Create environments batch exports backfill
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
- idstringA UUID string identifying this batch export. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- namestringA human-readable name for this BatchExport. 
- modelWhich model this BatchExport is exporting. - events- Events
- persons- Persons
- sessions- Sessions
 
- destination
- interval
- pausedbooleanWhether this BatchExport is paused or not. 
- last_paused_atstringThe timestamp at which this BatchExport was last paused. 
- start_atstringTime before which any Batch Export runs won't be triggered. 
- end_atstringTime after which any Batch Export runs won't be triggered. 
- hogql_querystring
- filters
Request
POST