On this page

Experiment Management API Version Endpoints

EU data residency

The examples on this page use the default base URL https://experiment.amplitude.com. If your project uses Amplitude's EU data center, use https://experiment.eu.amplitude.com instead. For more information, refer to Regions.

List versions

bash
GET https://experiment.amplitude.com/api/1/versions

Fetch a list of versions for all experiments or flags that the management API key can access. The list spans multiple projects when the key scope includes them.

Query parameters

Response

A successful request returns a 200 OK response. The response body contains a JSON list of versions and a cursor to the next page.

Versions are ordered by creation time, descending.

Example cURL

bash
curl --request GET \
    --url 'https://experiment.amplitude.com/api/1/versions?limit=3&cursor=3000&start=2023-01-01T00:00:00Z&end=2024-12-31T23:59:59Z' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>'

Example response

json
    {
        "nextCursor": 3003,
        "versions": [
            {
                "createdAt": "2023-07-29T03:32:49.594Z",
                "createdBy": <userId>,
                "version": 3,
                "flagConfig": {
                    "id": <id>,
                    "projectId": <projectId>,
                    "deployments": [<deploymentId>],
                    "key": "flag-key",
                    "name": "flag-key",
                    "description": "feature flag access",
                    "enabled": true,
                    "evaluationMode": "remote",
                    "bucketingKey": "amplitude_id",
                    "bucketingSalt": "mHdQDzeE",
                    "bucketingUnit": "User",
                    "variants": [
                        {
                            "key": "on"
                        }
                    ],
                    "rolloutPercentage": 0,
                    "rolloutWeights": {
                        "on": 1
                    },
                    "targetSegments": [
                        {
                            "name": "Segment 1",
                            "conditions": [
                                {
                                    "prop": "country",
                                    "op": "is",
                                    "type": "property",
                                    "values": [
                                        "United States"
                                    ]
                                }
                            ],
                            "percentage": 0,
                            "bucketingKey": "amplitude_id",
                            "rolloutWeights": {
                                "on": 1
                            }
                        }
                    ]
                }
            },
            {
                "createdAt": "2023-07-29T03:32:39.494Z",
                "createdBy": <userId>,
                "version": 2,
                "flagConfig": {
                    "id": <id>,
                    "projectId": <projectId>,
                    "deployments": [<deploymentId>],
                    "key": "flag-key",
                    "name": "flag-key",
                    "description": "feature flag access",
                    "enabled": false,
                    "evaluationMode": "remote",
                    "bucketingKey": "amplitude_id",
                    "bucketingSalt": "mHdQDzeE",
                    "bucketingUnit": "User",
                    "variants": [
                        {
                            "key": "on"
                        }
                    ],
                    "rolloutPercentage": 0,
                    "rolloutWeights": {
                        "on": 1
                    },
                    "targetSegments": [
                        {
                            "name": "Segment 1",
                            "conditions": [
                                {
                                    "prop": "country",
                                    "op": "is",
                                    "type": "property",
                                    "values": [
                                        "United States"
                                    ]
                                }
                            ],
                            "percentage": 0,
                            "bucketingKey": "amplitude_id",
                            "rolloutWeights": {
                                "on": 1
                            }
                        }
                    ]
                }
            },
            {
                "createdAt": "2023-07-29T03:30:45.703Z",
                "createdBy": <userId>,
                "version": 1,
                "flagConfig": {
                    "id": <id>,
                    "projectId": <projectId>,
                    "deployments": [],
                    "key": "flag-key",
                    "name": "flag-key",
                    "description": "",
                    "enabled": false,
                    "evaluationMode": "remote",
                    "bucketingKey": "amplitude_id",
                    "bucketingSalt": "mHdQDzeE",
                    "bucketingUnit": "User",
                    "variants": [
                        {
                            "key": "on"
                        }
                    ],
                    "rolloutPercentage": 0,
                    "rolloutWeights": {
                        "on": 1
                    },
                    "targetSegments": []
                }
            }
        ]
    }

Was this helpful?