# Get feature flags

Retrieve a paginated list of feature flags with search, filtering, and sorting capabilities by name or creation date (`createdAt` or `name` fields).

Endpoint: GET /resources/feature-flags/v1
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Query parameters:

  - `offset` (number)
    Page offset of the results to return

  - `limit` (number)
    Number of results per page

  - `filter` (string)
    Search input, searchable by `name`

  - `orderBy` (string)
    Field to order results by create date (`createdAt`) or name (`name`)

  - `sortType` (string)
    Sort type, ASC for ascending, DESC for descending

## Response 200 fields (application/json):

  - `items` (array)

  - `items.id` (string)
    UUID string that represents the feature flag ID
    Example: e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3

  - `items.name` (string)
    String that represent the feature flag name
    Example: Test Feature Flag

  - `items.on` (boolean)
    Boolean indicating whether the feature flag is on
    Example: true

  - `items.offTreatment` (string)
    Enum that represents the treatment in case feature flag is off
    Enum: "true", "false"

  - `items.defaultTreatment` (string)
    Enum that represents the default treatment
    Enum: "true", "false"

  - `items.feature` (object)
    Object that represents the related feature

  - `items.feature.id` (string)
    UUID string representing the feature ID
    Example: e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3

  - `items.feature.key` (string)
    String representing the feature key
    Example: test-feature

  - `items.feature.name` (string)
    String representing the feature name
    Example: Test Feature

  - `items.description` (string)
    String the represents the feature flag description
    Example: This is a test feature flag

  - `items.metadata` (string)
    JSON String that represents additional custom metadata to the feature flag entity
    Example: {}

  - `items.rules` (array)
    Array of rules that represents the set of conditions targeting the feature

  - `items.rules.description` (string, required)
    String that represents the description of the rule
    Example: This is the first rule

  - `items.rules.conditionLogic` (string, required)
    Enum that represents the rule conditions logic
    Enum: "and"

  - `items.rules.conditions` (array, required)
    Array of conditions

  - `items.rules.conditions.attribute` (string, required)
    String representing an attribute with a subset of condition(s) that is used in code to enact targeting rules
    Example: myCustomAttribute

  - `items.rules.conditions.attributeType` (string, required)
    Enum that represents the attribute type (`frontegg` or `custom`)
    Enum: "custom", "frontegg"

  - `items.rules.conditions.negate` (boolean, required)
    Boolean that indicates whether the condition should negate the operation
    Example: false

  - `items.rules.conditions.op` (string, required)
    Enum that represents the operation applied to the condition
    Enum: "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"

  - `items.rules.conditions.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))
    Example: {"list":["valueA","valueB"]}

  - `items.rules.treatment` (string, required)
    String that represents the treatment for this rule
    Enum: "true", "false"

  - `items.updatedAt` (string)
    Date when feature flag was created
    Example: 2022-01-01T00:00:00

  - `items.createdAt` (string)
    Date when feature flag was last updated
    Example: 2022-01-01T00:00:00

  - `hasNext` (boolean)

