Force a variant assignment for an experiment context
POST
/api/v4/experiments/{experiment_name}/assignments
Forces a specific variant assignment for the given experiment and context. The assignment is stored in Redis cache and will persist until overwritten. Defaults to current user if no context is provided.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” experiment_name
required
string
Request Body required
Section titled “ Request Body required ” Media type application/json
object
variant
required
The variant name to assign (e.g., control, candidate)
string
context
Context parameters (user, namespace, project). An actor context is resolved from the user. Defaults to current user.
object
Example generated
{ "variant": "example", "context": {}}Responses
Section titled “ Responses ”OK
Media type application/json
object
experiment
string
variant
string
context_key
string
cached
boolean
Example
{ "experiment": "lightweight_trial_registration_redesign", "variant": "candidate", "context_key": "abc123def456", "cached": true}Bad request
Unauthorized
Forbidden
Not Found