Experiment Management API Version Endpoints

List versions

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

Fetch a list of versions of all experiments or flags can the management API key has access to, across multiple projects if the key scope has access to them.

Query parameters

Name Description
start The ISO 8601 formatted start time of versions to return (inclusive).
end The ISO 8601 formatted end time to versions to return (exclusive).
limit The max number of deployments to return. Capped at 1000.
cursor The offset to start the "page" of results from.

Response

A successful request returns a 200 OK response and a list of versions encoded as JSON in the response body, along with the cursor to next page.

Versions are ordered by version creation time descending.

Example cURL

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

Exaple response

1{
2 "nextCursor": 3003,
3 "versions": [
4 {
5 "createdAt": "2023-07-29T03:32:49.594Z",
6 "createdBy": <userId>,
7 "version": 3,
8 "flagConfig": {
9 "id": <id>,
10 "projectId": <projectId>,
11 "deployments": [<deploymentId>],
12 "key": "flag-key",
13 "name": "flag-key",
14 "description": "feature flag access",
15 "enabled": true,
16 "evaluationMode": "remote",
17 "bucketingKey": "amplitude_id",
18 "bucketingSalt": "mHdQDzeE",
19 "bucketingUnit": "User",
20 "variants": [
21 {
22 "key": "on"
23 }
24 ],
25 "rolloutPercentage": 0,
26 "rolloutWeights": {
27 "on": 1
28 },
29 "targetSegments": [
30 {
31 "name": "Segment 1",
32 "conditions": [
33 {
34 "prop": "country",
35 "op": "is",
36 "type": "property",
37 "values": [
38 "United States"
39 ]
40 }
41 ],
42 "percentage": 0,
43 "bucketingKey": "amplitude_id",
44 "rolloutWeights": {
45 "on": 1
46 }
47 }
48 ]
49 }
50 },
51 { ...
52 "createdAt": "2023-07-29T03:32:39.494Z",
53 "createdBy": <userId>,
54 "version": 2,
55 "flagConfig": {
56 "id": <id>,
57 "projectId": <projectId>,
58 "deployments": [<deploymentId>],
59 "key": "flag-key",
60 "name": "flag-key",
61 "description": "feature flag access",
62 "enabled": false,
63 "evaluationMode": "remote",
64 "bucketingKey": "amplitude_id",
65 "bucketingSalt": "mHdQDzeE",
66 "bucketingUnit": "User",
67 "variants": [
68 {
69 "key": "on"
70 }
71 ],
72 "rolloutPercentage": 0,
73 "rolloutWeights": {
74 "on": 1
75 },
76 "targetSegments": [
77 {
78 "name": "Segment 1",
79 "conditions": [
80 {
81 "prop": "country",
82 "op": "is",
83 "type": "property",
84 "values": [
85 "United States"
86 ]
87 }
88 ],
89 "percentage": 0,
90 "bucketingKey": "amplitude_id",
91 "rolloutWeights": {
92 "on": 1
93 }
94 }
95 ]
96 }
97 },
98 {
99 "createdAt": "2023-07-29T03:30:45.703Z",
100 "createdBy": <userId>,
101 "version": 1,
102 "flagConfig": {
103 "id": <id>,
104 "projectId": <projectId>,
105 "deployments": [],
106 "key": "flag-key",
107 "name": "flag-key",
108 "description": "",
109 "enabled": false,
110 "evaluationMode": "remote",
111 "bucketingKey": "amplitude_id",
112 "bucketingSalt": "mHdQDzeE",
113 "bucketingUnit": "User",
114 "variants": [
115 {
116 "key": "on"
117 }
118 ],
119 "rolloutPercentage": 0,
120 "rolloutWeights": {
121 "on": 1
122 },
123 "targetSegments": []
124 }
125 }
126 ]
127}

Was this page helpful?

Thanks for your feedback!

June 4th, 2024

Need help? Contact Support

Visit Amplitude.com

Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.