List Variations
1 min
GET
https://api.optimizely.com/flags/v1//projects/{project_id}/flags/{flag_key}/variations
project_idintegerThe project identifier
flag_keystringThe Flag identifier
per_pageinteger<int64>The max number of items to include per page or results.
page_tokenstring<p>Pagination page token. Implements prev, next, last, first</p>
page_windowinteger<p>Number of previous and next page links to supply for the request (defaults to 1).</p>
sortarraySort the Variations based on the attributes from left to right.
archivedboolean<p>Filter the Variations for a Flag by archived field status. A Variation for a Flag can be either archived (archived=true) or unarchived (archived=false)</p>
enabledboolean<p>Filter the Variations for a Flag by enabled field status. A Variation for a Flag can be either enabled (enabled=true) or disabled (enabled=false)</p>
in_useboolean<p>Filter the Variations for a Flag by whether the variation is used (in_use=true) or not (in_use=false) in rules.</p>
querystring<p>Filter the Variations for a Flag by name, key, or
description substring</p>
acceptstringGenerated from available response content types
200<p>Successful retrieval of a page of Variations for a Flag.</p>
<p>The response includes RESTful JSON (<a href="https://restfuljson.org/" target="_blank">https://restfuljson.org/</a>) styled links and pagination metadata.
Objects in this API MAY include a url property for a link to itself and MAY append _url to properties for related links.
If a link is not present in the response, it indicates a user is not authorized to access the related resource.</p>
400Malformed requests and invalid parameter names and types
401Invalid credentials
403Do not have permission to perform the operation
curl --request GET \
--url https://api.optimizely.com/flags/v1//projects/{project_id}/flags/{flag_key}/variations \
--header 'accept: application/json'