---
title: "Get Single Feature Flag"
method: GET
path: "/resources/feature-flags/v1/{id}"
tags: ["Feature Flags"]
---

# Get Single Feature Flag

`GET /resources/feature-flags/v1/{id}`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/feature-flags/v1/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/feature-flags/v1/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a single feature flag

## Path parameters

- `id` string, required

## Response `200`

- FeatureFlagDto
  - `id` string: UUID string that represents the feature flag ID
  - `name` string: String that represent the feature flag name
  - `on` boolean: Boolean indicating whether the feature flag is on
  - `offTreatment` 'true' | 'false': Enum that represents the treatment in case feature flag is off
  - `defaultTreatment` 'true' | 'false': Enum that represents the default treatment
  - `feature` FeatureFlagFeature
    - `id` string: UUID string representing the feature ID
    - `key` string: String representing the feature key
    - `name` string: String representing the feature name
  - `description` string: String the represents the feature flag description
  - `metadata` string: JSON String that represents additional custom metadata to the feature flag entity
  - `rules` RuleDto[]: Array of rules that represents the set of conditions targeting the feature
    - `description` string, required: String that represents the description of the rule
    - `conditionLogic` 'and', required: Enum that represents the rule conditions logic
    - `conditions` ConditionDto[], required: Array of conditions
      - `attribute` string, required: String representing an attribute with a subset of condition(s) that is used in code to enact targeting rules
      - `attributeType` 'custom' | 'frontegg', required: Enum that represents the attribute type (`frontegg` or `custom`)
      - `negate` boolean, required: Boolean that indicates whether the condition should negate the operation
      - `op` 'in_list' | 'starts_with' | 'ends_with' | 'contains' | 'matches' | 'equal' | 'greater_than' | 'greater_than_equal' | 'lower_than' | 'lower_than_equal' | 'between_numeric' | 'is' | 'on' | 'between_date' | 'on_or_after' | 'on_or_before', required: Enum that represents the operation applied to the condition
      - `value` object, required: Object that contains the condition data according to selected operation, each operation requires different structure (see [documentation](https://docs.frontegg.com/docs/entitlements-backend-sdk#operations-and-corresponding-object-structure))
    - `treatment` 'true' | 'false', required: String that represents the treatment for this rule
  - `updatedAt` string, date-time: Date when feature flag was created
  - `createdAt` string, date-time: Date when feature flag was last updated

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
