experiments

Status of the flag-cleanup Desktop task opened for this experiment.

When an experiment was ended or shipped with open_cleanup_pr=true, a Desktop task removes the experiment's feature-flag code and opens a draft pull request. This returns that task's latest run status and the PR URL once one is opened. Poll until is_terminal is true. Returns 404 when no cleanup task was opened.

get/api/projects/{project_id}/experiments/{id}/flag_cleanup_task/

Request

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

Path parameters

idinteger required

A unique integer value identifying this experiment.

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/.

Response

task_idstring uuid required

ID of the flag-cleanup Desktop task.

run_status'not_started' | 'queued' | 'in_progress' | 'completed' | 'failed' | 'cancelled' required
  • not_started - not_started
  • queued - queued
  • in_progress - in_progress
  • completed - completed
  • failed - failed
  • cancelled - cancelled
is_terminalboolean required

Whether the run has finished (successfully or not). Stop polling once true.

pr_urlstring nullable required

URL of the pull request the task opened, when it opened one.

can_view_taskboolean required

Whether the requesting user can open the task in PostHog Desktop. Cleanup tasks are visible to their creator only, so other viewers should not be shown a task link.

Changes

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