> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/feature-management-experimentation/management-and-administration/api-best-practices/examples/get-list.md). Agents can also search and read this documentation through its [MCP server](https://developer.harness.io/~gitbook/mcp).

# Get a list of feature flags with rollout status

Learn how to retrieve a list of feature flag names and their status using the Admin API.

## Overview <a href="#overview" id="overview"></a>

Use this script to retrieve a list of feature flag names and their status for a given workspace.

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* Install the [Python Admin API Wrapper](https://developer.harness.io/feature-management-experimentation/management-and-administration/api-best-practices/wrappers/python-admin-api.md).
* You have created an Admin API key from the Harness FME UI.

## Configuration <a href="#configuration" id="configuration"></a>

Before running the script, update the following variables in the code:

* `ADMIN API KEY`: Your Admin API key.
* `workspaceName`: The name of the workspace. If you only have one workspace, use the Default workspace.

Run this script using Python 3 from your local machine or preferred development environment. This script returns a list of feature flag names and the rollout status value.

```python
from splitapiclient.main import get_client

#############################################
workspaceName="Default"
#############################################

client = get_client({'apikey': 'ADMIN API KEY'})
ws = client.workspaces.find(workspaceName)
for sp in client.splits.list(ws.id):
    if sp._rolloutStatus != {}:
        print (sp.name+", "+str(sp._rolloutStatus['name']))
```

## Next steps

* Go to [Export all feature flags that have not received impressions from a specific date](https://developer.harness.io/feature-management-experimentation/management-and-administration/api-best-practices/examples/export-flags.md) to find flags that have not received impressions.
* Go to [Find feature flags dependent on a specific flag](https://developer.harness.io/feature-management-experimentation/management-and-administration/api-best-practices/examples/find-flags.md) to find flags that depend on a specific flag.

{% @harness-feedback/feedback %}
