Batch
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
List all batch exports
Required API key scopes
batch_export:read
Path parameters
- organization_idstring
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Request
GET
/api /organizations /:organization_id /batch_exports
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/organizations/:organization_id/batch_exports/
Response
Status 200
{"count": 123,"next": "http://api.example.org/accounts/?offset=400&limit=100","previous": "http://api.example.org/accounts/?offset=200&limit=100","results": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}]}
Create batch exports
Required API key scopes
batch_export:write
Path parameters
- organization_idstring
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
POST
/api /organizations /:organization_id /batch_exports
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/organizations/:organization_id/batch_exports/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 201
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Retrieve batch exports
Required API key scopes
batch_export:read
Path parameters
- idstring
A UUID string identifying this batch export.
- organization_idstring
Response
Request
GET
/api /organizations /:organization_id /batch_exports /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/organizations/:organization_id/batch_exports/:id/
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Update batch exports
Required API key scopes
batch_export:write
Path parameters
- idstring
A UUID string identifying this batch export.
- organization_idstring
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
PATCH
/api /organizations /:organization_id /batch_exports /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl -X PATCH \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/organizations/:organization_id/batch_exports/:id/\-d team_id="integer"
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Delete batch exports
Required API key scopes
batch_export:write
Path parameters
- idstring
A UUID string identifying this batch export.
- organization_idstring
Request
DELETE
/api /organizations /:organization_id /batch_exports /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl -X DELETE \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/organizations/:organization_id/batch_exports/:id/
Response
Status 204 No response body
Create batch exports backfill
Trigger a backfill for a BatchExport.
Path parameters
- idstring
A UUID string identifying this batch export.
- organization_idstring
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
POST
/api /organizations /:organization_id /batch_exports /:id /backfill
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/organizations/:organization_id/batch_exports/:id/backfill/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Create batch exports pause
Pause a BatchExport.
Path parameters
- idstring
A UUID string identifying this batch export.
- organization_idstring
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
POST
/api /organizations /:organization_id /batch_exports /:id /pause
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/organizations/:organization_id/batch_exports/:id/pause/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Create batch exports unpause
Unpause a BatchExport.
Path parameters
- idstring
A UUID string identifying this batch export.
- organization_idstring
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
POST
/api /organizations /:organization_id /batch_exports /:id /unpause
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/organizations/:organization_id/batch_exports/:id/unpause/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
List all batch exports list
Required API key scopes
batch_export:read
Path 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/.
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Request
GET
/api /projects /:project_id /batch_exports
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/
Response
Status 200
{"count": 123,"next": "http://api.example.org/accounts/?offset=400&limit=100","previous": "http://api.example.org/accounts/?offset=200&limit=100","results": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}]}
Create batch exports create
Required API key scopes
batch_export:write
Path 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.
- 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
Response
Request
POST
/api /projects /:project_id /batch_exports
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 201
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
List all batch exports logs
Required API key scopes
batch_export:read
Path parameters
- batch_export_idstring
- 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/.
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Request
GET
/api /projects /:project_id /batch_exports /:batch_export_id /logs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:batch_export_id/logs/
Response
Status 200
{"count": 123,"next": "http://api.example.org/accounts/?offset=400&limit=100","previous": "http://api.example.org/accounts/?offset=200&limit=100","results": [{"team_id": 0,"batch_export_id": "string","run_id": "string","timestamp": "2019-08-24T14:15:22Z","level": "DEBUG","message": "string"}]}
List all batch exports runs
Required API key scopes
batch_export:read
Path parameters
- batch_export_idstring
The BatchExport this run belongs to.
- 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/.
Query parameters
- cursorstring
The pagination cursor value.
Response
Request
GET
/api /projects /:project_id /batch_exports /:batch_export_id /runs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:batch_export_id/runs/
Response
Status 200
{"next": "string","previous": "string","results": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}]}
Retrieve batch exports runs
Required API key scopes
batch_export:read
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/.
Response
Request
GET
/api /projects /:project_id /batch_exports /:batch_export_id /runs /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:batch_export_id/runs/:id/
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}
List all batch exports runs logs
Required API key scopes
batch_export:read
Path parameters
- batch_export_idstring
- 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/.
- run_idstring
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Request
GET
/api /projects /:project_id /batch_exports /:batch_export_id /runs /:run_id /logs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:batch_export_id/runs/:run_id/logs/
Response
Status 200
{"count": 123,"next": "http://api.example.org/accounts/?offset=400&limit=100","previous": "http://api.example.org/accounts/?offset=200&limit=100","results": [{"team_id": 0,"batch_export_id": "string","run_id": "string","timestamp": "2019-08-24T14:15:22Z","level": "DEBUG","message": "string"}]}
Retrieve batch exports retrieve
Required API key scopes
batch_export:read
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/.
Response
Request
GET
/api /projects /:project_id /batch_exports /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:id/
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Update batch exports update
Required API key scopes
batch_export:write
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/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
PATCH
/api /projects /:project_id /batch_exports /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl -X PATCH \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:id/\-d team_id="integer"
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Delete batch exports destroy
Required API key scopes
batch_export:write
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/.
Request
DELETE
/api /projects /:project_id /batch_exports /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl -X DELETE \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:id/
Response
Status 204 No response body
Create batch exports backfill create
Trigger a backfill for a BatchExport.
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/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
POST
/api /projects /:project_id /batch_exports /:id /backfill
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:id/backfill/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Create batch exports pause create
Pause a BatchExport.
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/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
POST
/api /projects /:project_id /batch_exports /:id /pause
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/batch_exports/:id/pause/\-d name="string",\-d destination=undefined,\-d interval=undefined
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}
Create batch exports unpause create
Unpause a BatchExport.
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/.
Request parameters
- namestring
A human-readable name for this BatchExport.
- 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
Response
Request
POST
/api /projects /:project_id /batch_exports /:id /unpause
Response
Status 200
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","team_id": 0,"name": "string","destination": {"type": "S3","config": null},"interval": "hour","paused": true,"created_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","last_paused_at": "2019-08-24T14:15:22Z","start_at": "2019-08-24T14:15:22Z","end_at": "2019-08-24T14:15:22Z","latest_runs": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","status": "Cancelled","records_completed": -2147483648,"latest_error": "string","data_interval_start": "2019-08-24T14:15:22Z","data_interval_end": "2019-08-24T14:15:22Z","cursor": "string","created_at": "2019-08-24T14:15:22Z","finished_at": "2019-08-24T14:15:22Z","last_updated_at": "2019-08-24T14:15:22Z","records_total_count": -2147483648,"batch_export": "0fa0a8a1-f280-4977-8bb4-bc7801a6902f"}],"hogql_query": "string","schema": null}