hog_functions
hog_functions

Rerun past invocations of this hog function from their stored payloads.

The CDP worker reads matching rows from the hog_invocation_results ClickHouse table, rehydrates the invocation from the stored invocation_globals, and re-enqueues onto cyclotron. Each rerun run reuses the original invocation_id with is_retry=1 set on the new lifecycle row so the UI can surface that it was a rerun.

Only types a cyclotron worker executes (TYPES_THAT_CAN_RERUN) can be rerun: rerun re-enqueues onto the cyclotron hog queue, and other types run elsewhere (source webhooks inline in the cdp-api HTTP handler, transformations during ingestion, site_* transpiled to client-side JS). A re-enqueued invocation of one of those would never drain and wedges the partition, so a rerun of a non-rerunnable type is rejected with a 400 here. A disabled function is rejected the same way: the worker skips its invocations, so the rerun could never execute.

Because rerun replays historical event/person/group data, it requires person:read and group:read on top of hog_function:write.

post/api/projects/{project_id}/hog_functions/{id}/rerun/

Request

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

Path parameters

idstring uuid required

A UUID string identifying this hog function.

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

Response

rerun_job_idstring required

ID of the cyclotron wrapper job that will run the rerun. Use this to poll status.

queued_countinteger required

Always 0 — rerun runs asynchronously. Kept for response shape stability.

skipped_countinteger required

Always 0 — rerun runs asynchronously. Kept for response shape stability.

Changes

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