---
title: "GET /api/v1/namespaces/{namespaceKey}/segments"
method: GET
path: "/api/v1/namespaces/{namespaceKey}/segments"
tags: ["Flipt", "SegmentsService"]
---

# GET /api/v1/namespaces/{namespaceKey}/segments

`GET /api/v1/namespaces/{namespaceKey}/segments`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/namespaces/{namespaceKey}/segments`
- Auth: HTTP bearer

## Path parameters

- `namespaceKey` string, required

## Query parameters

- `limit` integer
- `offset` integer
- `pageToken` string
- `reference` string

## Response `200`

OK

- SegmentList
  - `segments` Segment[]
    - `key` string
    - `name` string
    - `description` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `constraints` Constraint[]
      - `id` string
      - `segmentKey` string
      - `type` 'UNKNOWN_COMPARISON_TYPE' | 'STRING_COMPARISON_TYPE' | 'NUMBER_COMPARISON_TYPE' | 'BOOLEAN_COMPARISON_TYPE' | 'DATETIME_COMPARISON_TYPE' | 'ENTITY_ID_COMPARISON_TYPE', enum
      - `property` string
      - `operator` string
      - `value` string
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
      - `namespaceKey` string
      - `description` string
    - `matchType` 'ALL_MATCH_TYPE' | 'ANY_MATCH_TYPE', enum
    - `namespaceKey` string
  - `nextPageToken` string
  - `totalCount` integer

## Changes

- **2024-08-08** `594afc3dbe2e`: 2 breaking, 8 warning
  - the `segments/items/constraints/items/type` response's property type changed from `integer` to `string` for status `200`
  - the `segments/items/matchType` response's property type changed from `integer` to `string` for status `200`
  - added the new `ALL_MATCH_TYPE` enum value to the `segments/items/matchType` response property for the response status `200`
  - added the new `ANY_MATCH_TYPE` enum value to the `segments/items/matchType` response property for the response status `200`
  - …6 more
- **2024-08-07** `291b2f802c58`: 2 breaking, 8 info
  - the `segments/items/constraints/items/type` response's property type changed from `string` to `integer` for status `200`
  - the `segments/items/matchType` response's property type changed from `string` to `integer` for status `200`
  - removed the `ALL_MATCH_TYPE` enum value from the `segments/items/matchType` response property for the response status `200`
  - removed the `ANY_MATCH_TYPE` enum value from the `segments/items/matchType` response property for the response status `200`
  - …6 more

[Operation history](https://skmtc.dev/flipt-io/apis/flipt-api/changes/api/v1/namespaces/:namespaceKey/segments/get.md)

---

[API](https://skmtc.dev/flipt-io/apis/flipt-api.md) - [All operations](https://skmtc.dev/flipt-io/apis/flipt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flipt-io/apis/flipt-api/revisions/6fe4caf26f13?raw)
