Flagsmith / Flagsmith/flagsmith

Filter feature states by segment

Open
#6,136 1 comment 0 reactions 0 assignees View on GitHub
api
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 14h
Merged PRs (30d)
124

Description

### Is your feature request related to a problem?

Currently segment override lists rely on retrieving feature-segments and filtering a list of environment feature states. This is convoluted and does not work well with paging.

### Describe the solution you'd like.

Add a segment parameter to the ``environments/:key/featurestates``

### Describe alternatives you've considered

Stick with the current approach, though this adds quite a lot of tech debt and bad FE code.

### Additional context

I realised this would be useful whilst developing https://github.com/Flagsmith/flagsmith/issues/6135

Contributor guide

Open the contributing guide

Research direction

Start by locating the environments/:key/featurestates API entry point and its existing paging behavior. Trace how feature states are currently filtered by segment, then verify that the endpoint accepts a segment parameter and returns the expected paged results without requiring the current list-filtering approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.