Flagsmith / Flagsmith/flagsmith

`GET api/v1/identities` returns feature_segment as integer FK instead of Edge Api object format

Open
#7,456 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

### How are you running Flagsmith

- [x] Self Hosted with Docker
- [x] Self Hosted with Kubernetes
- [x] SaaS at flagsmith.com
- [ ] Some other way (add details in description below)

### Describe the bug

`GET /api/v1/identities/` emits feature_segment as a bare integer FK (e.g. 321), while the Edge API emits `{"priority": }`. The same field is represented with two different shapes, and the foreign key response doesn't contain priority

### Steps To Reproduce

1. Run a self-hosted core API or use Core as evaluation host
2. Create a feature with a segment override.
3. Call `GET /api/v1/identities/?identifier=` for an identity matching the segment.
4. `feature_segment` in the response is an integer instead of `{"priority": }`.

### Expected behavior

`feature_segment` is a `{"priority": }`object matching what the Edge API returns

### Screenshots

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.