provider experiments GET
/api/projects/{project_id}/experiments/ @utdk/posthog
/api/projects/{project_id}/experiments/ experiments_list
List experiments for the current project. Supports filtering by status and archival state.
- archived query
- Filter by archived state. Defaults to non-archived experiments only.
- boolean
- created_by_id query
- Filter to experiments created by the given user(s). Accepts a single user ID, or a JSON-encoded / comma-separated list of user IDs to match any of them.
- string
- event query
- Filter to experiments whose metrics reference this event name. Matches events used directly in metric queries as well as events behind any actions those metrics reference.
- string
- feature_flag_id query
- Filter to experiments linked to the given feature flag ID.
- integer
- limit query
- Number of results to return per page.
- integer
- offset query
- The initial index from which to return the results.
- integer
- order query
- Field to order by. Prefix with '-' for descending. Allowlisted fields include name, created_at, updated_at, start_date, end_date, duration, and status.
- 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
- prompt_name query
- Filter to experiments created from an LLM prompt with this name. Matches experiments whose parameters.prompt_metadata.name equals the given value.
- string
- search query
- Free-text search applied to the experiment name (case-insensitive).
- string
- status query
- Filter by experiment status. "running", "paused", and "exposure_frozen" are mutually exclusive: "running" returns launched experiments with an active feature flag, "paused" returns launched experiments whose feature flag is deactivated, and "exposure_frozen" returns launched experiments whose exposure was frozen to the already-enrolled cohort while metrics keep flowing. "complete" is an alias for "stopped". "all" disables status filtering.
- enum: all, complete, draft, exposure_frozen…
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.experimentsList()