provider hog_functionshog_functions POST
/api/projects/{project_id}/hog_functions/{id}/rerun/ @utdk/posthog
/api/projects/{project_id}/hog_functions/{id}/rerun/ hog_functions_rerun_create
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.
For source-webhook functions the worker strips `request.headers` from
the rehydrated globals before re-enqueuing (see the rerun paginator):
those headers carry the inbound sender's credentials, and replaying
them through a reconfigured function would let a write-access user
exfiltrate stored secrets.
Because rerun replays historical event/person/group data, it requires
`person:read` and `group:read` on top of `hog_function:write`.
- id path required
- A UUID string identifying this hog function.
- string
- project_id path required
- Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
- string
Try it
Authentication
Configure credentials for PostHog API
Code snippet
Updates live as you fill in the form above.
TypeScript
import posthog from '@utdk/posthog';
await posthog.hogFunctionsRerunCreate()