provider experiments POST
/api/projects/{project_id}/experiments/{id}/metrics_recalculation/ @utdk/posthog
/api/projects/{project_id}/experiments/{id}/metrics_recalculation/ experiments_metrics_recalculation_create
Trigger a batch recalculation of all metrics for this experiment.
Returns 201 with the new pending recalculation, or 200 with the active one if a recalculation is
already pending or in progress for this experiment. The response payload intentionally does not
include the `results` array — at POST time the workflow has just been queued and no per-metric
results exist yet. Clients should poll `GET metrics_recalculation/{id}/` for results as the workflow
progresses.
- id path required
- A unique integer value identifying this experiment.
- integer
- 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.experimentsMetricsRecalculationCreate({
"trigger": "manual"
})