Experiments
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
GET |
Create experiments setup context
Facts about this project that decide how to configure a new experiment.
Returns the team's experiment defaults, which SDKs call feature flags, traffic on a target surface, the baseline of a candidate metric, how recent experiments were set up, and the most reused shared metrics. Each section has its own status, so a slow or failed read leaves the others valid. POST because the inputs describe a plan rather than a resource; the endpoint only reads.
Required API key scopes
experiment:readexperiment_saved_metric:readquery:readRequest parameters
- target_eventstring | null
- target_url_containsstring | null
- target_properties
- metric_eventstring | null
- metric_properties
- previous_experiments_limitintegerDefault:
10 - shared_metrics_limitintegerDefault:
10
Response
Example request
POST /api /projects /:project_id /experiments /setup_contextExample response
Status 200
Retrieve experiments stats
Mixin for ViewSets to handle approval-gate exceptions raised from decorated serializers.
Intercepts ApprovalRequired (409) and PolicyConflict (400) raised by the @approval_gate decorator on serializer methods and converts them into the same responses the viewset path produces (see decorators._result_to_response), so both paths share one contract.
Required API key scopes
experiment:readExample request
GET /api /projects /:project_id /experiments /stats










