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
hogFunctionsRerunCreate
POST/api/projects/{project_id}/hog_functions/{id}/rerun/
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`.

Parameters

required

A UUID string identifying this hog function.

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

required

Required. `window_start` / `window_end` pin the query to a small set of date partitions on the `hog_invocation_results` table. Optional `invocation_ids` restricts to specific invocations within that window.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.hogFunctionsRerunCreate()