Skip to content

Get current variant assignment for an experiment context

GET
/api/v4/experiments/{experiment_name}/assignments

Returns the currently cached variant assignment for the given experiment and context. Defaults to current user if no context is provided.

experiment_name
required
string
context

Context parameters (user, namespace, project). Pass every key the experiment declares in context_keys; experiments can declare multiple keys. An actor context is resolved from the user. The user defaults to the current user.

object

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