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

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

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

## Request

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

## Path parameters

- `namespaceKey` string, required
- `key` string, required

## Query parameters

- `reference` string

## Response `200`

OK

- 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

## Changes

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