Skip to content

Fetch Variants

To evaluate a user for your flag, fetch variants from Experiment's remote evaluation servers. You can fetch variants for a user using either the Evaluation REST API or one of the SDKs.

Evaluation REST API

The Evaluation REST API is the fastest way to test your flag without having to install an SDK.

Input your deployment_key and a user_id into the table below. You may either copy the curl command, or press the Fetch Variants button to make the request in the browser.

Potential data changes

This example makes real requests to the API and can potentially change the data in your Amplitude project. We recommend using a development project when testing APIs.

curl --request GET \
     --url '' \
     --header 'Authorization: Api-Key '

Variable
Description
(Required) The deployment key.
(Required) The user ID used to fetch variants. This should be the same user you track exposure for.
The server zone for your Amplitude project
Fetch Variants

Result:



SDKs

Experiment SDKs make it even easier to fetch variants for a user. Client-side SDKs are especially useful for storing pre-fetched variants on the client-side for zero latency variant access.


Was this page helpful?