> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List feature flags

> > For the complete documentation index, see [llms.txt](https://launchdarkly-preview.mintlify.app/llms.txt). For the full documentation snapshot, see [llms-full.txt](https://launchdarkly-preview.mintlify.app/llms-full.txt).

Get a list of all feature flags in the given project. You can include information specific to different environments by adding `env` query parameter. For example, setting `env=production` adds configuration details about your production environment to the response. You can also filter feature flags by tag with the `tag` query parameter.

> #### Recommended use
>
> This endpoint can return a large amount of information. We recommend using some or all of these query parameters to decrease response time and overall payload size: `limit`, `env`, `query`, and `filter=creationDate`.

### Filtering flags

You can filter on certain fields using the `filter` query parameter. For example, setting `filter=query:dark-mode,tags:beta+test` matches flags with the string `dark-mode` in their key or name, ignoring case, which also have the tags `beta` and `test`.

The `filter` query parameter supports the following arguments:

| Filter argument       | Description | Example              |
|-----------------------|-------------|----------------------|
| `applicationEvaluated`  | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` |
| `archived`              | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead |
| `contextKindsEvaluated` | A `+`-separated list of context kind keys. It filters the list to flags which have been evaluated in the past 30 days for all of the context kinds in the list. | `filter=contextKindsEvaluated:user+application` |
| `codeReferences.max`    | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` |
| `codeReferences.min`    | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` |
| `creationDate`          | An object with an optional `before` field whose value is Unix time in milliseconds. It filters the list to flags created before the date. | `filter=creationDate:{"before":1690527600000}` |
| `evaluated`             | An object that contains a key of `after` and a value in Unix time in milliseconds. It filters the list to all flags that have been evaluated since the time you specify, in the environment provided. This filter requires the `filterEnv` filter. | `filter=evaluated:{"after":1690527600000},filterEnv:production` |
| `filterEnv`             | A valid environment key. You must use this field for filters that are environment-specific. If there are multiple environment-specific filters, you only need to include this field once. | `filter=evaluated:{"after": 1590768455282},filterEnv:production` |
| `guardedRollout` | A string, one of `any`, `monitoring`, `regressed`, `rolledBack`, `completed`, `archived`. It filters the list to flags that are part of guarded rollouts. | `filter=guardedRollout:monitoring` |
| `hasExperiment`         | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` |
| `maintainerId`          | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` |
| `maintainerTeamKey`     | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` |
| `query`                 | A string. It filters the list to flags that include the specified string in their key or name. It is not case sensitive. | `filter=query:example` |
| `releasePipeline`       | A release pipeline key. It filters the list to flags that are either currently active in the release pipeline or have completed the release pipeline. | `filter=releasePipeline:default-release-pipeline` |
| `state`                 | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` |
| `sdkAvailability`       | A string, one of `client`, `mobile`, `anyClient`, `server`. Using `client` filters the list to flags whose client-side SDK availability is set to use the client-side ID. Using `mobile` filters to flags set to use the mobile key. Using `anyClient` filters to flags set to use either the client-side ID or the mobile key. Using `server` filters to flags set to use neither, that is, to flags only available in server-side SDKs.  | `filter=sdkAvailability:client` |
| `tags`                  | A `+`-separated list of tags. It filters the list to flags that have all of the tags in the list. | `filter=tags:beta+test` |
| `type`                  | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` |

The documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`.

By default, this endpoint returns all flags. You can page through the list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the returned `_links` field. These links will not be present if the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page.

### Sorting flags

You can sort flags based on the following fields:

- `creationDate` sorts by the creation date of the flag.
- `key` sorts by the key of the flag.
- `maintainerId` sorts by the flag maintainer.
- `name` sorts by flag name.
- `tags` sorts by tags.
- `targetingModifiedDate` sorts by the date that the flag's targeting rules were last modified in a given environment. It must be used with `env` parameter and it can not be combined with any other sort. If multiple `env` values are provided, it will perform sort using the first one. For example, `sort=-targetingModifiedDate&env=production&env=staging` returns results sorted by `targetingModifiedDate` for the `production` environment.
- `type` sorts by flag type

All fields are sorted in ascending order by default. To sort in descending order, prefix the field with a dash ( - ). For example, `sort=-name` sorts the response by flag name in descending order.

### Expanding response

LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:

- `codeReferences` includes code references for the feature flag
- `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days
- `migrationSettings` includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where `purpose` is `migration`.

For example, `expand=evaluation` includes the `evaluation` field in the response.

### Migration flags
For migration flags, the cohort information is included in the `rules` property of a flag's response, and default cohort information is included in the `fallthrough` property of a flag's response.
To learn more, read [Migration Flags](https://launchdarkly.com/docs/home/flags/migration).




## OpenAPI

````yaml /openapi/launchdarkly-api.json get /api/v2/flags/{projectKey}
openapi: 3.0.3
info:
  title: LaunchDarkly REST API
  description: >
    > For the complete documentation index, see
    https://launchdarkly-preview.mintlify.app/llms.txt.

    > For the full documentation snapshot, see
    https://launchdarkly-preview.mintlify.app/llms-full.txt.


    This is the LaunchDarkly REST API. It lets you build custom integrations,
    automate your workflow, and manage feature flags and other LaunchDarkly
    resources programmatically.


    For authentication, rate limits, pagination, versioning, JSON Patch and
    semantic patches, beta resources, and the full SDK End-of-Life table, read
    the [REST API overview](https://launchdarkly-preview.mintlify.app/api).


    To fetch the complete OpenAPI spec, use [Get OpenAPI
    spec](https://launchdarkly.com/docs/api/other/get-openapi-spec).
  contact:
    name: LaunchDarkly Technical Support Team
    url: https://support.launchdarkly.com
    email: support@launchdarkly.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '2.0'
servers:
  - url: https://app.launchdarkly.com
    description: ' Default'
  - url: https://app.launchdarkly.us
    description: ' Federal'
security:
  - ApiKey:
      - read
      - write
tags:
  - name: Access tokens
    description: >-
      The access tokens API allows you to list, create, modify, and delete
      access tokens programmatically.
  - name: Account members
    description: >-
      The account members API allows you to invite new members to an account by
      making a `POST` request to `/api/v2/members`. When you invite a new member
      to an account, an invitation is sent to the email you provided.
  - name: Account usage (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: AI Configs
    description: >-
      The AI Configs API allows you to create, retrieve, and edit AI Configs, AI
      Config variations, and AI model configurations.
  - name: Announcements
    description: >-
      The announcements API lets you create and update a custom announcement
      banner that appears in the LaunchDarkly user interface for everyone in
      your organization.
  - name: Applications (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Approvals
    description: >-
      An account member can request approval on changes to a flag or AI Config's
      targeting or variations, or to a segment's targeting. Members may be
      required to request approval depending on the settings in their
      LaunchDarkly project.
  - name: Approvals (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Audit log
    description: >-
      LaunchDarkly maintains a record of all the changes made to any resource in
      the system. You can access this history using the audit log API, including
      filtering by timestamps, or using a custom policy to select which entries
      to receive.
  - name: Code references
    description: >-
      > ### Code references is an Enterprise feature > > Code references is
      available to customers on an Enterprise plan. To learn more, [read about
      our pricing](https://launchdarkly.com/pricing/).
  - name: Context settings
    description: >-
      You can use the context settings API to assign a context to a specific
      variation for any feature flag. To learn more, read [View and manage
      contexts](https://launchdarkly.com/docs/home/observability/context-attributes#view-and-manage-contexts).
  - name: Contexts
    description: >-
      Contexts are people, services, machines, or other resources that encounter
      feature flags in your product. Contexts are identified by their `kind`,
      which describes the type of resources encountering flags, and by their
      `key`.
  - name: Custom roles
    description: >-
      > ### Custom roles is an Enterprise feature > > Custom roles is available
      to customers on an Enterprise plan. To learn more, [read about our
      pricing](https://launchdarkly.com/pricing/).
  - name: Data Export destinations
    description: >-
      > ### Data Export is an add-on feature > > Data Export is available as an
      add-on for customers on a Foundation or Enterprise plan. To learn more,
      [read about our pricing](https://launchdarkly.com/pricing/).
  - name: Environments
    description: >-
      Environments allow you to maintain separate rollout rules in different
      contexts, from local development to QA, staging, and production. With the
      LaunchDarkly Environments API, you can programmatically list, create, and
      manage environments.
  - name: Experiments
    description: >-
      > ### Available for subscription customers > > Experimentation is
      available to all customers on a Developer, Foundation, or Enterprise
      subscription. If you're on an older Pro or Enterprise plan,
      Experimentation is available as an add-on.
  - name: Feature flags
    description: >-
      The feature flags API allows you to list, create, and modify feature flags
      and their targeting. For example, you can control percentage rollouts,
      target specific contexts, or even toggle off a feature flag
      programmatically.
  - name: Feature flags (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Flag import configurations (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Flag links (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Flag triggers
    description: >-
      > ### Flag triggers is an Enterprise feature > > Flag triggers is
      available to customers on an Enterprise plan. To learn more, [read about
      our pricing](https://launchdarkly.com/pricing/).
  - name: Follow flags
    description: >-
      Follow flags to receive email updates about targeting changes to a flag in
      a project and environment.
  - name: Holdouts (beta)
    description: >-
      > ### Available for customers using Experimentation > > Holdouts are
      available to customers using
      [Experimentation](https://launchdarkly.com/docs/api/experiments).
  - name: Insights charts (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights deployments (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights flag events (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights pull requests (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights repositories (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights scores (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Integration audit log subscriptions
    description: >-
      Audit log integration subscriptions allow you to send audit log events
      hooks to one of dozens of external tools. For example, you can send flag
      change event webhooks to external third party software.
  - name: Integration delivery configurations (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Integrations (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Layers
    description: >-
      > ### Available for customers using Experimentation > > Layers are
      available to customers using
      [Experimentation](https://launchdarkly.com/docs/api/experiments).
  - name: Metrics
    description: >-
      Metrics track flag behavior over time when an experiment is running. The
      data generated from experiments gives you more insight into the impact of
      a particular flag.
  - name: Metrics (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: OAuth2 Clients
    description: >-
      The OAuth2 client API allows you to register a LaunchDarkly OAuth client
      for use in your own custom integrations.
  - name: Persistent store integrations (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Projects
    description: >-
      Projects allow you to manage multiple different software projects under
      one LaunchDarkly account. Each project has its own unique set of
      environments and feature flags.
  - name: Relay Proxy configurations
    description: >-
      > ### Relay Proxy automatic configuration is an Enterprise feature > >
      Relay Proxy automatic configuration is available to customers on an
      Enterprise plan. To learn more, [read about our
      pricing](https://launchdarkly.com/pricing/).
  - name: Release pipelines (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Release policies (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Releases (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Scheduled changes
    description: >-
      > ### Scheduled flag changes is an Enterprise feature > > Scheduled flag
      changes is available to customers on an Enterprise plan. To learn more,
      [read about our pricing](https://launchdarkly.com/pricing/).
  - name: Segments
    description: >-
      > ### Synced segments and larger list-based segments are an Enterprise
      feature > > This section documents endpoints for rule-based, list-based,
      and synced segments.
  - name: Tags
    description: >-
      Tags are simple strings that you can attach to most resources in
      LaunchDarkly. Tags are useful for grouping resources into a set that you
      can name in a resource specifier.
  - name: Teams
    description: >-
      > ### Teams is an Enterprise feature > > Teams is available to customers
      on an Enterprise plan. To learn more, [read about our
      pricing](https://launchdarkly.com/pricing/).
  - name: Teams (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: User settings
    description: >-
      > ### Contexts are now available > > After you have upgraded your
      LaunchDarkly SDK to use contexts instead of users, you should use
      [Contexts](https://launchdarkly.com/docs/api/contexts) instead of the user
      settings API.
  - name: Users
    description: >-
      > ### Contexts are now available > > After you have upgraded your
      LaunchDarkly SDK to use contexts instead of users, you should use
      [Contexts](https://launchdarkly.com/docs/api/contexts) instead of these
      endpoints.
  - name: Users (beta)
    description: >-
      > ### Contexts are now available > > After you have upgraded your
      LaunchDarkly SDK to use contexts instead of users, you should use
      [Contexts](https://launchdarkly.com/docs/api/contexts) instead of these
      endpoints.
  - name: Views (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Webhooks
    description: >-
      The webhooks API lets you build your own integrations that subscribe to
      activities in LaunchDarkly. When you generate an activity in LaunchDarkly,
      such as when you change a flag or you create a project, LaunchDarkly sends
      an HTTP POST payload to the...
  - name: Workflow templates
    description: >-
      > ### Workflows are in maintenance mode > > The workflows feature is in
      maintenance mode, and is planned for future deprecation at a date not yet
      specified.
  - name: Workflows
    description: >-
      > ### Workflows are in maintenance mode > > The workflows feature is in
      maintenance mode, and is planned for future deprecation at a date not yet
      specified.
  - name: Other
    description: Other requests available in the LaunchDarkly API.
paths:
  /api/v2/flags/{projectKey}:
    get:
      tags:
        - Feature flags
      summary: List feature flags
      description: >
        > For the complete documentation index, see
        [llms.txt](https://launchdarkly-preview.mintlify.app/llms.txt). For the
        full documentation snapshot, see
        [llms-full.txt](https://launchdarkly-preview.mintlify.app/llms-full.txt).


        Get a list of all feature flags in the given project. You can include
        information specific to different environments by adding `env` query
        parameter. For example, setting `env=production` adds configuration
        details about your production environment to the response. You can also
        filter feature flags by tag with the `tag` query parameter.


        > #### Recommended use

        >

        > This endpoint can return a large amount of information. We recommend
        using some or all of these query parameters to decrease response time
        and overall payload size: `limit`, `env`, `query`, and
        `filter=creationDate`.


        ### Filtering flags


        You can filter on certain fields using the `filter` query parameter. For
        example, setting `filter=query:dark-mode,tags:beta+test` matches flags
        with the string `dark-mode` in their key or name, ignoring case, which
        also have the tags `beta` and `test`.


        The `filter` query parameter supports the following arguments:


        | Filter argument       | Description | Example              |

        |-----------------------|-------------|----------------------|

        | `applicationEvaluated`  | A string. It filters the list to flags that
        are evaluated in the application with the given key. |
        `filter=applicationEvaluated:com.launchdarkly.cafe` |

        | `archived`              | (deprecated) A boolean value. It filters the
        list to archived flags. | Use `filter=state:archived` instead |

        | `contextKindsEvaluated` | A `+`-separated list of context kind keys.
        It filters the list to flags which have been evaluated in the past 30
        days for all of the context kinds in the list. |
        `filter=contextKindsEvaluated:user+application` |

        | `codeReferences.max`    | An integer value. Use `0` to return flags
        that do not have code references. | `filter=codeReferences.max:0` |

        | `codeReferences.min`    | An integer value. Use `1` to return flags
        that do have code references. | `filter=codeReferences.min:1` |

        | `creationDate`          | An object with an optional `before` field
        whose value is Unix time in milliseconds. It filters the list to flags
        created before the date. |
        `filter=creationDate:{"before":1690527600000}` |

        | `evaluated`             | An object that contains a key of `after` and
        a value in Unix time in milliseconds. It filters the list to all flags
        that have been evaluated since the time you specify, in the environment
        provided. This filter requires the `filterEnv` filter. |
        `filter=evaluated:{"after":1690527600000},filterEnv:production` |

        | `filterEnv`             | A valid environment key. You must use this
        field for filters that are environment-specific. If there are multiple
        environment-specific filters, you only need to include this field once.
        | `filter=evaluated:{"after": 1590768455282},filterEnv:production` |

        | `guardedRollout` | A string, one of `any`, `monitoring`, `regressed`,
        `rolledBack`, `completed`, `archived`. It filters the list to flags that
        are part of guarded rollouts. | `filter=guardedRollout:monitoring` |

        | `hasExperiment`         | A boolean value. It filters the list to
        flags that are used in an experiment. | `filter=hasExperiment:true` |

        | `maintainerId`          | A valid member ID. It filters the list to
        flags that are maintained by this member. |
        `filter=maintainerId:12ab3c45de678910abc12345` |

        | `maintainerTeamKey`     | A string. It filters the list to flags that
        are maintained by the team with this key. |
        `filter=maintainerTeamKey:example-team-key` |

        | `query`                 | A string. It filters the list to flags that
        include the specified string in their key or name. It is not case
        sensitive. | `filter=query:example` |

        | `releasePipeline`       | A release pipeline key. It filters the list
        to flags that are either currently active in the release pipeline or
        have completed the release pipeline. |
        `filter=releasePipeline:default-release-pipeline` |

        | `state`                 | A string, either `live`, `deprecated`, or
        `archived`. It filters the list to flags in this state. |
        `filter=state:archived` |

        | `sdkAvailability`       | A string, one of `client`, `mobile`,
        `anyClient`, `server`. Using `client` filters the list to flags whose
        client-side SDK availability is set to use the client-side ID. Using
        `mobile` filters to flags set to use the mobile key. Using `anyClient`
        filters to flags set to use either the client-side ID or the mobile key.
        Using `server` filters to flags set to use neither, that is, to flags
        only available in server-side SDKs.  | `filter=sdkAvailability:client` |

        | `tags`                  | A `+`-separated list of tags. It filters the
        list to flags that have all of the tags in the list. |
        `filter=tags:beta+test` |

        | `type`                  | A string, either `temporary` or `permanent`.
        It filters the list to flags with the specified type. |
        `filter=type:permanent` |


        The documented values for the `filter` query are prior to URL encoding.
        For example, the `+` in `filter=tags:beta+test` must be encoded to
        `%2B`.


        By default, this endpoint returns all flags. You can page through the
        list with the `limit` parameter and by following the `first`, `prev`,
        `next`, and `last` links in the returned `_links` field. These links
        will not be present if the pages they refer to don't exist. For example,
        the `first` and `prev` links will be missing from the response on the
        first page.


        ### Sorting flags


        You can sort flags based on the following fields:


        - `creationDate` sorts by the creation date of the flag.

        - `key` sorts by the key of the flag.

        - `maintainerId` sorts by the flag maintainer.

        - `name` sorts by flag name.

        - `tags` sorts by tags.

        - `targetingModifiedDate` sorts by the date that the flag's targeting
        rules were last modified in a given environment. It must be used with
        `env` parameter and it can not be combined with any other sort. If
        multiple `env` values are provided, it will perform sort using the first
        one. For example,
        `sort=-targetingModifiedDate&env=production&env=staging` returns results
        sorted by `targetingModifiedDate` for the `production` environment.

        - `type` sorts by flag type


        All fields are sorted in ascending order by default. To sort in
        descending order, prefix the field with a dash ( - ). For example,
        `sort=-name` sorts the response by flag name in descending order.


        ### Expanding response


        LaunchDarkly supports the `expand` query param to include additional
        fields in the response, with the following fields:


        - `codeReferences` includes code references for the feature flag

        - `evaluation` includes evaluation information within returned
        environments, including which context kinds the flag has been evaluated
        for in the past 30 days

        - `migrationSettings` includes migration settings information within the
        flag and within returned environments. These settings are only included
        for migration flags, that is, where `purpose` is `migration`.


        For example, `expand=evaluation` includes the `evaluation` field in the
        response.


        ### Migration flags

        For migration flags, the cohort information is included in the `rules`
        property of a flag's response, and default cohort information is
        included in the `fallthrough` property of a flag's response.

        To learn more, read [Migration
        Flags](https://launchdarkly.com/docs/home/flags/migration).
      operationId: getFeatureFlags
      parameters:
        - name: projectKey
          in: path
          description: The project key
          required: true
          schema:
            type: string
            format: string
            description: The project key
        - name: env
          in: query
          description: Filter configurations by environment
          schema:
            type: string
            format: string
            description: Filter configurations by environment
        - name: tag
          in: query
          description: Filter feature flags by tag
          schema:
            type: string
            format: string
            description: Filter feature flags by tag
        - name: limit
          in: query
          description: The number of feature flags to return. Defaults to 20.
          schema:
            type: integer
            format: int64
            description: The number of feature flags to return. Defaults to 20.
        - name: offset
          in: query
          description: >-
            Where to start in the list. Use this with pagination. For example,
            an offset of 10 skips the first ten items and then returns the next
            items in the list, up to the query `limit`.
          schema:
            type: integer
            format: int64
            description: >-
              Where to start in the list. Use this with pagination. For example,
              an offset of 10 skips the first ten items and then returns the
              next items in the list, up to the query `limit`.
        - name: archived
          in: query
          description: >-
            Deprecated, use `filter=archived:true` instead. A boolean to filter
            the list to archived flags. When this is absent, only unarchived
            flags will be returned
          deprecated: true
          schema:
            type: boolean
            description: >-
              Deprecated, use `filter=archived:true` instead. A boolean to
              filter the list to archived flags. When this is absent, only
              unarchived flags will be returned
        - name: summary
          in: query
          description: >-
            By default, flags do _not_ include their lists of prerequisites,
            targets, or rules for each environment. Set `summary=0` and include
            the `env` query parameter to include these fields for each flag
            returned.
          schema:
            type: boolean
            description: >-
              By default, flags do _not_ include their lists of prerequisites,
              targets, or rules for each environment. Set `summary=0` and
              include the `env` query parameter to include these fields for each
              flag returned.
        - name: filter
          in: query
          description: >-
            A comma-separated list of filters. Each filter is of the form
            field:value. Read the endpoint description for a full list of
            available filter fields.
          schema:
            type: string
            format: string
            description: >-
              A comma-separated list of filters. Each filter is of the form
              field:value. Read the endpoint description for a full list of
              available filter fields.
        - name: sort
          in: query
          description: >-
            A comma-separated list of fields to sort by. Fields prefixed by a
            dash ( - ) sort in descending order. Read the endpoint description
            for a full list of available sort fields.
          schema:
            type: string
            format: string
            description: >-
              A comma-separated list of fields to sort by. Fields prefixed by a
              dash ( - ) sort in descending order. Read the endpoint description
              for a full list of available sort fields.
        - name: compare
          in: query
          description: >-
            Deprecated, unavailable in API version `20240415`. A boolean to
            filter results by only flags that have differences between
            environments.
          deprecated: true
          schema:
            type: boolean
            description: >-
              Deprecated, unavailable in API version `20240415`. A boolean to
              filter results by only flags that have differences between
              environments.
        - name: expand
          in: query
          description: >-
            A comma-separated list of fields to expand in the response.
            Supported fields are explained above.
          schema:
            type: string
            format: string
            description: >-
              A comma-separated list of fields to expand in the response.
              Supported fields are explained above.
      responses:
        '200':
          description: Global flags collection response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureFlags'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestErrorRep'
        '401':
          description: Invalid access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorRep'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorRep'
        '404':
          description: Invalid resource identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorRep'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedErrorRep'
components:
  schemas:
    FeatureFlags:
      type: object
      required:
        - items
        - _links
      properties:
        items:
          type: array
          description: An array of feature flags
          items:
            $ref: '#/components/schemas/FeatureFlag'
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
          example:
            self:
              href: /api/v2/flags/default
              type: application/json
        totalCount:
          type: integer
          description: The total number of flags
          example: 1
        totalCountWithDifferences:
          type: integer
          description: >-
            The number of flags that have differences between environments. Only
            shown when query parameter <code>compare</code> is
            <code>true</code>.
          example: 0
    InvalidRequestErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: invalid_request
        message:
          type: string
          description: Description of the error
          example: Invalid request body
    UnauthorizedErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: unauthorized
        message:
          type: string
          description: Description of the error
          example: Invalid access token
    ForbiddenErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: forbidden
        message:
          type: string
          description: Description of the error
          example: Forbidden. Access to the requested resource was denied.
    NotFoundErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: not_found
        message:
          type: string
          description: Description of the error
          example: Invalid resource identifier
    RateLimitedErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: rate_limited
        message:
          type: string
          description: Description of the error
          example: You've exceeded the API rate limit. Try again later.
    FeatureFlag:
      type: object
      required:
        - name
        - kind
        - key
        - _version
        - creationDate
        - variations
        - temporary
        - tags
        - _links
        - experiments
        - customProperties
        - archived
      properties:
        name:
          type: string
          description: A human-friendly name for the feature flag
          example: My Flag
        kind:
          type: string
          description: Kind of feature flag
          example: boolean
          enum:
            - boolean
            - multivariate
        description:
          type: string
          description: Description of the feature flag
          example: This flag controls the example widgets
        key:
          type: string
          description: A unique key used to reference the flag in your code
          example: flag-key-123abc
        _version:
          type: integer
          description: Version of the feature flag
          example: 1
        creationDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of flag creation date
          example: '1494437420312'
        includeInSnippet:
          type: boolean
          description: >-
            Deprecated, use <code>clientSideAvailability</code>. Whether this
            flag should be made available to the client-side JavaScript SDK
          example: true
          deprecated: true
        clientSideAvailability:
          $ref: '#/components/schemas/ClientSideAvailability'
          description: Which type of client-side SDKs the feature flag is available to
          example: '{"usingMobileKey":true,"usingEnvironmentId":false}'
        variations:
          type: array
          description: An array of possible variations for the flag
          items:
            $ref: '#/components/schemas/Variation'
          example:
            - _id: e432f62b-55f6-49dd-a02f-eb24acf39d05
              value: true
            - _id: a00bf58d-d252-476c-b915-15a74becacb4
              value: false
        temporary:
          type: boolean
          description: Whether the flag is a temporary flag
          example: true
        tags:
          type: array
          description: Tags for the feature flag
          items:
            type: string
          example:
            - example-tag
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
          example:
            parent:
              href: /api/v2/flags/my-project
              type: application/json
            self:
              href: /api/v2/flags/my-project/my-flag
              type: application/json
        maintainerId:
          type: string
          description: Associated maintainerId for the feature flag
          example: 569f183514f4432160000007
        _maintainer:
          $ref: '#/components/schemas/MemberSummary'
          description: Associated maintainer member info for the feature flag
        maintainerTeamKey:
          type: string
          description: The key of the associated team that maintains this feature flag
          example: team-1
        _maintainerTeam:
          $ref: '#/components/schemas/MaintainerTeam'
          description: Associated maintainer team info for the feature flag
        goalIds:
          type: array
          description: Deprecated, use <code>experiments</code> instead
          items:
            type: string
          example: []
          deprecated: true
        experiments:
          $ref: '#/components/schemas/ExperimentInfoRep'
          description: Experimentation data for the feature flag
          example: '{"baselineIdx": 0,"items": []}'
        customProperties:
          $ref: '#/components/schemas/CustomProperties'
          description: >-
            Metadata attached to the feature flag, in the form of the property
            key associated with a name and array of values for the metadata to
            associate with this flag. Typically used to store data related to an
            integration.
          example: '{"jira.issues":{"name":"Jira issues","value":["is-123","is-456"]}}'
        archived:
          type: boolean
          description: Boolean indicating if the feature flag is archived
          example: false
        archivedDate:
          $ref: '#/components/schemas/UnixMillis'
          description: If archived is true, date of archive
          example: '1494437420312'
        deprecated:
          type: boolean
          description: Boolean indicating if the feature flag is deprecated
          example: false
        deprecatedDate:
          $ref: '#/components/schemas/UnixMillis'
          description: If deprecated is true, date of deprecation
          example: '1494437420312'
        defaults:
          $ref: '#/components/schemas/Defaults'
          description: >-
            The indices, from the array of variations, for the variations to
            serve by default when targeting is on and when targeting is off.
            These variations will be used for this flag in new environments. If
            omitted, the first and last variation will be used.
          example: '{"onVariation":0,"offVariation":1}'
        _purpose:
          type: string
        migrationSettings:
          $ref: '#/components/schemas/FlagMigrationSettingsRep'
          description: Migration-related settings for the flag
        environments:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/FeatureFlagConfig'
          description: >-
            Details on the environments for this flag. Only returned if the
            request is filtered by environment, using the <code>filterEnv</code>
            query parameter.
          example:
            my-environment:
              _environmentName: My Environment
              _site:
                href: /default/my-environment/features/client-side-flag
                type: text/html
              _summary:
                prerequisites: 0
                variations:
                  '0':
                    contextTargets: 1
                    isFallthrough: true
                    nullRules: 0
                    rules: 0
                    targets: 1
                  '1':
                    isOff: true
                    nullRules: 0
                    rules: 0
                    targets: 0
              archived: false
              contextTargets:
                - contextKind: device
                  values:
                    - device-key-123abc
                  variation: 0
              fallthrough:
                variation: 0
              lastModified: 1627071171347
              offVariation: 1
              'on': false
              prerequisites: []
              rules: []
              salt: 61eddeadbeef4da1facecafe3a60a397
              sel: 810edeadbeef4844facecafe438f2999492
              targets:
                - contextKind: user
                  values:
                    - user-key-123abc
                  variation: 0
              trackEvents: false
              trackEventsFallthrough: false
              version: 1
    Link:
      type: object
      properties:
        href:
          type: string
        type:
          type: string
    UnixMillis:
      type: integer
      format: int64
    ClientSideAvailability:
      type: object
      properties:
        usingMobileKey:
          type: boolean
        usingEnvironmentId:
          type: boolean
    Variation:
      type: object
      required:
        - value
      properties:
        _id:
          type: string
          description: The ID of the variation. Leave empty when you are creating a flag.
        value:
          description: >-
            The value of the variation. For boolean flags, this must be
            <code>true</code> or <code>false</code>. For multivariate flags,
            this may be a string, number, or JSON object.
        description:
          type: string
          description: >-
            Description of the variation. Defaults to an empty string, but is
            omitted from the response if not set.
        name:
          type: string
          description: >-
            A human-friendly name for the variation. Defaults to an empty
            string, but is omitted from the response if not set.
    MemberSummary:
      type: object
      required:
        - _links
        - _id
        - role
        - email
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
          example:
            self:
              href: /api/v2/members/569f183514f4432160000007
              type: application/json
        _id:
          type: string
          description: The member's ID
          example: 569f183514f4432160000007
        firstName:
          type: string
          description: The member's first name
          example: Ariel
        lastName:
          type: string
          description: The member's last name
          example: Flores
        role:
          type: string
          description: >-
            The member's base role. If the member has no additional roles, this
            role will be in effect.
          example: admin
        email:
          type: string
          description: The member's email address
          example: ariel@acme.com
    MaintainerTeam:
      type: object
      required:
        - key
        - name
      properties:
        key:
          type: string
          description: The key of the maintainer team
          example: team-key-123abc
        name:
          type: string
          description: A human-friendly name for the maintainer team
          example: Example team
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
          example:
            parent:
              href: /api/v2/teams
              type: application/json
            roles:
              href: /api/v2/teams/example-team/roles
              type: application/json
            self:
              href: /api/v2/teams/example-team
              type: application/json
    ExperimentInfoRep:
      type: object
      required:
        - baselineIdx
        - items
      properties:
        baselineIdx:
          type: integer
        items:
          type: array
          items:
            $ref: '#/components/schemas/LegacyExperimentRep'
    CustomProperties:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/customProperty'
    Defaults:
      type: object
      required:
        - onVariation
        - offVariation
      properties:
        onVariation:
          type: integer
          description: >-
            The index, from the array of variations for this flag, of the
            variation to serve by default when targeting is on.
          example: 0
        offVariation:
          type: integer
          description: >-
            The index, from the array of variations for this flag, of the
            variation to serve by default when targeting is off.
          example: 1
    FlagMigrationSettingsRep:
      type: object
      properties:
        contextKind:
          type: string
          description: >-
            The context kind targeted by this migration flag. Only applicable
            for six-stage migrations.
          example: device
        stageCount:
          type: integer
          description: The number of stages for this migration flag
          example: 6
    FeatureFlagConfig:
      type: object
      required:
        - 'on'
        - archived
        - salt
        - sel
        - lastModified
        - version
        - _site
        - _environmentName
        - trackEvents
        - trackEventsFallthrough
      properties:
        'on':
          type: boolean
          description: Whether the flag is on
        archived:
          type: boolean
          description: Boolean indicating if the feature flag is archived
        salt:
          type: string
        sel:
          type: string
        lastModified:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of when the flag configuration was most recently modified
        version:
          type: integer
          description: Version of the feature flag
        targets:
          type: array
          description: >-
            An array of the individual targets that will receive a specific
            variation based on their key. Individual targets with a context kind
            of 'user' are included here.
          items:
            $ref: '#/components/schemas/Target'
        contextTargets:
          type: array
          description: >-
            An array of the individual targets that will receive a specific
            variation based on their key. Individual targets with context kinds
            other than 'user' are included here.
          items:
            $ref: '#/components/schemas/Target'
        rules:
          type: array
          description: >-
            An array of the rules for how to serve a variation to specific
            targets based on their attributes
          items:
            $ref: '#/components/schemas/Rule'
        fallthrough:
          $ref: '#/components/schemas/VariationOrRolloutRep'
          description: >-
            Details on the variation or rollout to serve as part of the flag's
            default rule
        offVariation:
          type: integer
          description: The ID of the variation to serve when the flag is off
        prerequisites:
          type: array
          description: >-
            An array of the prerequisite flags and their variations that are
            required before this flag takes effect
          items:
            $ref: '#/components/schemas/Prerequisite'
        _site:
          $ref: '#/components/schemas/Link'
          description: >-
            Details on how to access the flag configuration in the LaunchDarkly
            UI
        _access:
          $ref: '#/components/schemas/Access'
          description: Details on the allowed and denied actions for this flag
        _environmentName:
          type: string
          description: The environment name
        trackEvents:
          type: boolean
          description: >-
            Whether LaunchDarkly tracks events for the feature flag, for all
            rules
        trackEventsFallthrough:
          type: boolean
          description: >-
            Whether LaunchDarkly tracks events for the feature flag, for the
            default rule
        _debugEventsUntilDate:
          $ref: '#/components/schemas/UnixMillis'
        _summary:
          $ref: '#/components/schemas/FlagSummary'
          description: A summary of the prerequisites and variations for this flag
        evaluation:
          $ref: '#/components/schemas/FlagConfigEvaluation'
          description: Evaluation information for the flag
        migrationSettings:
          $ref: '#/components/schemas/FlagConfigMigrationSettingsRep'
          description: Migration-related settings for the flag configuration
    LegacyExperimentRep:
      type: object
      properties:
        metricKey:
          type: string
          example: my-metric
        _metric:
          $ref: '#/components/schemas/MetricListingRep'
        environments:
          type: array
          items:
            type: string
          example:
            - production
            - test
            - my-environment
        _environmentSettings:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ExperimentEnvironmentSettingRep'
    customProperty:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          description: The name of the custom property of this type.
          example: Jira issues
        value:
          type: array
          description: >-
            An array of values for the custom property data to associate with
            this flag.
          items:
            type: string
          example:
            - is-123
            - is-456
    Target:
      type: object
      required:
        - values
        - variation
      properties:
        values:
          type: array
          description: >-
            A list of the keys for targets that will receive this variation
            because of individual targeting
          items:
            type: string
        variation:
          type: integer
          description: >-
            The index, from the array of variations for this flag, of the
            variation to serve this list of targets
        contextKind:
          type: string
          description: The context kind of the individual target
    Rule:
      type: object
      required:
        - clauses
        - trackEvents
      properties:
        _id:
          type: string
          description: The flag rule ID
        disabled:
          type: boolean
          description: Whether the rule is disabled
        variation:
          type: integer
          description: >-
            The index of the variation, from the array of variations for this
            flag
        rollout:
          $ref: '#/components/schemas/Rollout'
          description: Details on the percentage rollout, if it exists
        clauses:
          type: array
          description: >-
            An array of clauses used for individual targeting based on
            attributes
          items:
            $ref: '#/components/schemas/Clause'
        trackEvents:
          type: boolean
          description: Whether LaunchDarkly tracks events for this rule
        description:
          type: string
          description: The rule description
        ref:
          type: string
    VariationOrRolloutRep:
      type: object
      properties:
        variation:
          type: integer
          description: >-
            The index of the variation, from the array of variations for this
            flag
        rollout:
          $ref: '#/components/schemas/Rollout'
          description: Details on the percentage rollout, if it exists
    Prerequisite:
      type: object
      required:
        - key
        - variation
      properties:
        key:
          type: string
        variation:
          type: integer
    Access:
      type: object
      required:
        - denied
        - allowed
      properties:
        denied:
          type: array
          items:
            $ref: '#/components/schemas/AccessDenied'
        allowed:
          type: array
          items:
            $ref: '#/components/schemas/AccessAllowedRep'
    FlagSummary:
      type: object
      required:
        - variations
        - prerequisites
      properties:
        variations:
          $ref: '#/components/schemas/AllVariationsSummary'
          description: A summary of the variations for this flag
        prerequisites:
          type: integer
          description: The number of prerequisites for this flag
    FlagConfigEvaluation:
      type: object
      properties:
        contextKinds:
          type: array
          items:
            type: string
    FlagConfigMigrationSettingsRep:
      type: object
      properties:
        checkRatio:
          type: integer
    MetricListingRep:
      type: object
      required:
        - _id
        - _versionId
        - key
        - name
        - kind
        - _links
        - tags
        - _creationDate
        - dataSource
      properties:
        experimentCount:
          type: integer
          description: The number of experiments using this metric
          example: 0
        metricGroupCount:
          type: integer
          description: The number of metric groups using this metric
          example: 0
        activeExperimentCount:
          type: integer
          description: The number of active experiments using this metric
          example: 2
        activeGuardedRolloutCount:
          type: integer
          description: The number of active guarded rollouts using this metric
          example: 1
        _id:
          type: string
          description: The ID of this metric
          example: 5902deadbeef667524a01290
        _versionId:
          type: string
          description: The version ID of the metric
          example: version-id-123abc
        _version:
          type: integer
          description: Version of the metric
          example: 1
        key:
          type: string
          description: A unique key to reference the metric
          example: metric-key-123abc
        name:
          type: string
          description: A human-friendly name for the metric
          example: My metric
        kind:
          type: string
          description: The kind of event the metric tracks
          example: custom
          enum:
            - pageview
            - click
            - custom
            - trace
        _attachedFlagCount:
          type: integer
          description: The number of feature flags currently attached to this metric
          example: 0
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
          example:
            parent:
              href: /api/v2/metrics/my-project
              type: application/json
            self:
              href: /api/v2/metrics/my-project/my-metric
              type: application/json
        _site:
          $ref: '#/components/schemas/Link'
          description: Details on how to access the metric in the LaunchDarkly UI
          example: '{"href":"/experiments/metrics/my-metric/edit","type":"text/html"}'
        _access:
          $ref: '#/components/schemas/Access'
          description: Details on the allowed and denied actions for this metric
        tags:
          type: array
          description: Tags for the metric
          items:
            type: string
          example: []
        _creationDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of when the metric was created
          example: '1628192791148'
        lastModified:
          $ref: '#/components/schemas/Modification'
        maintainerId:
          type: string
          description: The ID of the member who maintains this metric
          example: 569fdeadbeef1644facecafe
        _maintainer:
          $ref: '#/components/schemas/MemberSummary'
          description: Details on the member who maintains this metric
          example: >-
            {"_links":{"self":{"href":"/api/v2/members/569fdeadbeef1644facecafe","type":"application/json"}},"_id":"569fdeadbeef1644facecafe","firstName":"Ariel","lastName":"Flores","role":"owner","email":"ariel@acme.com"}
        description:
          type: string
          description: Description of the metric
        category:
          type: string
          description: The category of the metric
          example: Error monitoring
        isNumeric:
          type: boolean
          description: >-
            For custom and trace metrics, whether to track numeric changes in
            value against a baseline (<code>true</code>) or to track a
            conversion when an end user takes an action (<code>false</code>).
          example: true
        successCriteria:
          type: string
          description: For custom and trace metrics, the success criteria
          enum:
            - HigherThanBaseline
            - LowerThanBaseline
        unit:
          type: string
          description: For numeric custom and trace metrics, the unit of measure
        eventKey:
          type: string
          description: For custom metrics, the event key to use in your code
          example: Order placed
        randomizationUnits:
          type: array
          description: An array of randomization units allowed for this metric
          items:
            type: string
          example:
            - user
        filters:
          $ref: '#/components/schemas/Filter'
          description: >-
            The filters narrowing down the audience based on context attributes
            or event properties.
          example: >-
            {"type":"group","op":"and","values":[{"type":"contextAttribute","op":"in","contextKind":"user","attribute":"country","values":["JP"],"negate":false},{"type":"eventProperty","op":"in","attribute":"category","values":["magic-wands"],"negate":false}]}
        unitAggregationType:
          type: string
          description: The method by which multiple unit event values are aggregated
          example: average
          enum:
            - average
            - sum
        analysisType:
          type: string
          description: The method for analyzing metric events
          example: mean
          enum:
            - mean
            - percentile
        percentileValue:
          type: integer
          description: >-
            The percentile for the analysis method. An integer denoting the
            target percentile between 0 and 100. Required when
            <code>analysisType</code> is <code>percentile</code>.
          example: 95
        eventDefault:
          $ref: '#/components/schemas/MetricEventDefaultRep'
        dataSource:
          $ref: '#/components/schemas/MetricDataSourceRefRep'
        lastSeen:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of most recent data for this metric, at one-hour fidelity
        archived:
          type: boolean
          description: Whether the metric version is archived
        archivedAt:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp when the metric version was archived
          example: '1609459200000'
        selector:
          type: string
          description: For click metrics, the CSS selectors
        urls:
          $ref: '#/components/schemas/UrlMatchers'
          description: For click and pageview metrics, the target URLs
          example: '[{"kind":"exact","url":"https://www.example.com/page1"}]'
        windowStartOffset:
          type: integer
          format: int64
          description: >-
            Not yet implemented - The start of the measurement window, in
            milliseconds relative to the unit's first exposure to a flag
            variation
        windowEndOffset:
          type: integer
          format: int64
          description: >-
            Not yet implemented - The end of the measurement window, in
            milliseconds relative to the unit's first exposure to a flag
            variation
        traceQuery:
          type: string
          description: For trace metrics, the trace query to use for the metric.
          example: service.name = "checkout"
        traceValueLocation:
          type: string
          description: >-
            For trace metrics, the location in the trace to use for numeric
            values.
          example: duration
    ExperimentEnvironmentSettingRep:
      type: object
      properties:
        startDate:
          $ref: '#/components/schemas/UnixMillis'
        stopDate:
          $ref: '#/components/schemas/UnixMillis'
        enabledPeriods:
          type: array
          items:
            $ref: '#/components/schemas/ExperimentEnabledPeriodRep'
    Rollout:
      type: object
      required:
        - variations
      properties:
        variations:
          type: array
          items:
            $ref: '#/components/schemas/WeightedVariation'
        experimentAllocation:
          $ref: '#/components/schemas/ExperimentAllocationRep'
        seed:
          type: integer
        bucketBy:
          type: string
        contextKind:
          type: string
    Clause:
      type: object
      required:
        - attribute
        - op
        - values
        - negate
      properties:
        _id:
          type: string
        attribute:
          type: string
        op:
          $ref: '#/components/schemas/Operator'
        values:
          type: array
          items: {}
        contextKind:
          type: string
        negate:
          type: boolean
    AccessDenied:
      type: object
      required:
        - action
        - reason
      properties:
        action:
          $ref: '#/components/schemas/ActionIdentifier'
        reason:
          $ref: '#/components/schemas/AccessDeniedReason'
    AccessAllowedRep:
      type: object
      required:
        - action
        - reason
      properties:
        action:
          $ref: '#/components/schemas/ActionIdentifier'
        reason:
          $ref: '#/components/schemas/AccessAllowedReason'
    AllVariationsSummary:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/VariationSummary'
    Modification:
      type: object
      properties:
        date:
          type: string
          format: date-time
          example: '2021-08-05T19:46:31.148082Z'
    Filter:
      type: object
      required:
        - type
        - op
        - values
        - negate
      properties:
        type:
          type: string
          description: Filter type. One of [contextAttribute, eventProperty, group]
          example: contextAttribute
          enum:
            - group
            - contextAttribute
            - eventProperty
        attribute:
          type: string
          description: >-
            If not a group node, the context attribute name or event property
            name to filter on
          example: country
        op:
          $ref: '#/components/schemas/Operator'
          description: The function to perform
          example: in
        values:
          type: array
          description: The context attribute / event property values or group member nodes
          items: {}
          example:
            - JP
        contextKind:
          type: string
          description: For context attribute filters, the context kind.
          example: user
        negate:
          type: boolean
          description: >-
            If set, then take the inverse of the operator. 'in' becomes 'not
            in'.
          example: false
    MetricEventDefaultRep:
      type: object
      properties:
        disabled:
          type: boolean
          description: >-
            Whether to disable defaulting missing unit events when calculating
            results. Defaults to false
        value:
          type: number
          description: >-
            The default value applied to missing unit events. Set to 0 when
            <code>disabled</code> is false. No other values are currently
            supported.
          example: 0
    MetricDataSourceRefRep:
      type: object
      required:
        - key
      properties:
        key:
          type: string
        environmentKey:
          type: string
        _name:
          type: string
        _integrationKey:
          type: string
    UrlMatchers:
      items:
        $ref: '#/components/schemas/UrlMatcher'
      type: array
    ExperimentEnabledPeriodRep:
      type: object
      properties:
        startDate:
          $ref: '#/components/schemas/UnixMillis'
        stopDate:
          $ref: '#/components/schemas/UnixMillis'
    WeightedVariation:
      type: object
      required:
        - variation
        - weight
      properties:
        variation:
          type: integer
        weight:
          type: integer
        _untracked:
          type: boolean
    ExperimentAllocationRep:
      type: object
      required:
        - defaultVariation
        - canReshuffle
      properties:
        defaultVariation:
          type: integer
        canReshuffle:
          type: boolean
    Operator:
      type: string
    ActionIdentifier:
      type: string
    AccessDeniedReason:
      type: object
      required:
        - effect
      properties:
        resources:
          type: array
          description: Resource specifier strings
          items:
            type: string
          example:
            - proj/*:env/*;qa_*:/flag/*
        notResources:
          type: array
          description: >-
            Targeted resources are the resources NOT in this list. The
            <code>resources</code> and <code>notActions</code> fields must be
            empty to use this field.
          items:
            type: string
        actions:
          type: array
          description: Actions to perform on a resource
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          example:
            - '*'
        notActions:
          type: array
          description: >-
            Targeted actions are the actions NOT in this list. The
            <code>actions</code> and <code>notResources</code> fields must be
            empty to use this field.
          items:
            $ref: '#/components/schemas/ActionSpecifier'
        effect:
          type: string
          description: >-
            Whether this statement should allow or deny actions on the
            resources.
          example: allow
          enum:
            - allow
            - deny
        role_name:
          type: string
    AccessAllowedReason:
      type: object
      required:
        - effect
      properties:
        resources:
          type: array
          description: Resource specifier strings
          items:
            type: string
          example:
            - proj/*:env/*;qa_*:/flag/*
        notResources:
          type: array
          description: >-
            Targeted resources are the resources NOT in this list. The
            <code>resources</code> and <code>notActions</code> fields must be
            empty to use this field.
          items:
            type: string
        actions:
          type: array
          description: Actions to perform on a resource
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          example:
            - '*'
        notActions:
          type: array
          description: >-
            Targeted actions are the actions NOT in this list. The
            <code>actions</code> and <code>notResources</code> fields must be
            empty to use this field.
          items:
            $ref: '#/components/schemas/ActionSpecifier'
        effect:
          type: string
          description: >-
            Whether this statement should allow or deny actions on the
            resources.
          example: allow
          enum:
            - allow
            - deny
        role_name:
          type: string
    VariationSummary:
      type: object
      required:
        - rules
        - nullRules
        - targets
        - contextTargets
      properties:
        rules:
          type: integer
        nullRules:
          type: integer
        targets:
          type: integer
        contextTargets:
          type: integer
        isFallthrough:
          type: boolean
        isOff:
          type: boolean
        rollout:
          type: integer
        bucketBy:
          type: string
    UrlMatcher:
      type: object
      additionalProperties: {}
    ActionSpecifier:
      type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````