List Flags
1 min
GET
https://api.optimizely.com/flags/v1//projects/{project_id}/flags
project_idintegerThe project identifier
per_pageinteger<int64>The max number of items to include per page or results.
page_numberinteger<int64><p>Bypass page_token to jump to specific page</p>
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 Flags based on the attributes from left to right.
archivedboolean<p>Filter the Flags by archived. A Flag can be either archived (archived=true) or unarchived (archived=false)</p>
enabledboolean<p>Filter the Flags by enabled. A Flag can be either enabled (enabled=true) or disabled (enabled=false)</p>
flag_statusarray<p>Filter the Flags by lifecycle status. Allowed values: draft, testing, live, paused, stale, archived.
Values may be prefixed with <code>!</code> to exclude that status.</p>
<ul>
<li>For matching one: <code>flag_status=live</code></li>
<li>For matching multiple (repeated params): <code>flag_status=live&flag_status=paused</code></li>
<li>For excluding: <code>flag_status=!draft&flag_status=!archived</code></li>
</ul>
rule_statusarray<p>Filter the Flags by Rule Status. Supports matching one, multiple, or excluding multiple values.</p>
<ul>
<li>For matching one: <code>rule_status=value</code></li>
<li>For matching multiple: <code>rule_status=value1,value2</code></li>
<li>For excluding multiple: <code>rule_status=!value1,!value2</code></li>
</ul>
environment_statusarray<p>Filter the Flags by Environment Status. Supports matching one, multiple, or excluding multiple values.</p>
<ul>
<li>For matching one: <code>environment_status=value</code></li>
<li>For matching multiple: <code>environment_status=value1,value2</code></li>
<li>For excluding multiple: <code>environment_status=!value1,!value2</code></li>
</ul>
environment_typearray<p>Filter the Flags by the environment_type</p>
environmentarrayFilter the Flags by the environment
rule_typearrayFilter the Flags by the rule type.
querystring<p>Filter the Flags by name, key, or
description substring</p>
key_listarrayFilter the Flags by multiple keys
owner_user_idarray<p>Filter Flags by owner user ID(s). Accepts single or multiple values.
Values may be prefixed with <code>!</code> to exclude that owner.</p>
<ul>
<li>For matching one: <code>owner_user_id=user_1</code></li>
<li>For matching multiple (repeated params): <code>owner_user_id=user_1&owner_user_id=user_2</code></li>
<li>For matching multiple (comma-separated): <code>owner_user_id=user_1,user_2</code></li>
<li>For excluding: <code>owner_user_id=!user_1&owner_user_id=!user_2</code></li>
<li>For flags with no owner (NULL): <code>owner_user_id=</code></li>
<li>For flags with owner OR no owner: <code>owner_user_id=user_1&owner_user_id=</code></li>
<li>For excluding flags with no owner: <code>owner_user_id=!</code></li>
</ul>
team_idsarray<p>Filter Flags by team ID(s). Returns flags that have ANY of the specified team IDs.
Values may be prefixed with <code>!</code> to exclude flags with those team IDs.</p>
<ul>
<li>For matching one: <code>team_ids=100</code></li>
<li>For matching multiple (repeated params): <code>team_ids=100&team_ids=200</code></li>
<li>For matching multiple (comma-separated): <code>team_ids=100,200</code></li>
<li>For excluding: <code>team_ids=!100&team_ids=!200</code></li>
<li>For flags with no teams (NULL/empty array): <code>team_ids=</code></li>
<li>For flags with specific team OR no teams: <code>team_ids=100&team_ids=</code></li>
<li>For excluding flags with no teams: <code>team_ids=!</code></li>
</ul>
acceptstringGenerated from available response content types
200<p>Successful retrieval of a page of Flags.</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 \
--header 'accept: application/json'