# List approval requests

GET https://app.launchdarkly.com/api/v2/approval-requests

Get all approval requests.

### Filtering approvals

LaunchDarkly supports the `filter` query param for filtering, with the following fields:

- `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf ["memberId1", "memberId2"]`.
- `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`.
- `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`.
- `resourceKind` filters for only approvals that correspond to the specified resource kind. For example: `filter=resourceKind equals flag`. Currently, `flag`, `segment`, and `aiConfig` resource kinds are supported.
- `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf ["pending", "approved"]`.
- `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf ["pending", "scheduled"]`.

You can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf ["pending","approved"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`.

### Expanding approval response

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

- `flag` includes the flag the approval request belongs to
- `project` includes the project the approval request belongs to
- `environments` includes the environments the approval request relates to

For example, `expand=project,flag` includes the `project` and `flag` fields in the response.


Reference: https://launchdarkly.com/docs/api/approvals/get-approval-requests

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: LaunchDarkly REST API
  version: 1.0.0
paths:
  /api/v2/approval-requests:
    get:
      operationId: get-approval-requests
      summary: List approval requests
      description: >
        Get all approval requests.


        ### Filtering approvals


        LaunchDarkly supports the `filter` query param for filtering, with the
        following fields:


        - `notifyMemberIds` filters for only approvals that are assigned to a
        member in the specified list. For example: `filter=notifyMemberIds anyOf
        ["memberId1", "memberId2"]`.

        - `requestorId` filters for only approvals that correspond to the ID of
        the member who requested the approval. For example: `filter=requestorId
        equals 457034721476302714390214`.

        - `resourceId` filters for only approvals that correspond to the the
        specified resource identifier. For example: `filter=resourceId equals
        proj/my-project:env/my-environment:flag/my-flag`.

        - `resourceKind` filters for only approvals that correspond to the
        specified resource kind. For example: `filter=resourceKind equals flag`.
        Currently, `flag`, `segment`, and `aiConfig` resource kinds are
        supported.

        - `reviewStatus` filters for only approvals which correspond to the
        review status in the specified list. The possible values are `approved`,
        `declined`, and `pending`. For example: `filter=reviewStatus anyOf
        ["pending", "approved"]`.

        - `status` filters for only approvals which correspond to the status in
        the specified list. The possible values are `pending`, `scheduled`,
        `failed`, and `completed`. For example: `filter=status anyOf ["pending",
        "scheduled"]`.


        You can also apply multiple filters at once. For example, setting
        `filter=projectKey equals my-project, reviewStatus anyOf
        ["pending","approved"]` matches approval requests which correspond to
        the `my-project` project key, and a review status of either `pending` or
        `approved`.


        ### Expanding approval response


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


        - `flag` includes the flag the approval request belongs to

        - `project` includes the project the approval request belongs to

        - `environments` includes the environments the approval request relates
        to


        For example, `expand=project,flag` includes the `project` and `flag`
        fields in the response.
      tags:
        - subpackage_approvals
      parameters:
        - name: filter
          in: query
          description: >-
            A comma-separated list of filters. Each filter is of the form `field
            operator value`. Supported fields are explained above.
          required: false
          schema:
            type: string
            format: string
        - name: expand
          in: query
          description: >-
            A comma-separated list of fields to expand in the response.
            Supported fields are explained above.
          required: false
          schema:
            type: string
            format: string
        - name: limit
          in: query
          description: >-
            The number of approvals to return. Defaults to 20. Maximum limit is
            200.
          required: false
          schema:
            type: integer
            format: int64
        - 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`.
          required: false
          schema:
            type: integer
            format: int64
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Approval request collection response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpandableApprovalRequestsResponse'
        '400':
          description: >-
            Unsupported filter field. Filter field must be one of: requestorId,
            projectKey, notifyMemberIds, reviewStatus, or status
          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'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedErrorRep'
servers:
  - url: https://app.launchdarkly.com
  - url: https://app.launchdarkly.us
components:
  schemas:
    UnixMillis:
      type: integer
      format: int64
      title: UnixMillis
    ApprovalRequestServiceKind:
      type: string
      title: ApprovalRequestServiceKind
    ExpandableApprovalRequestResponseReviewStatus:
      type: string
      enum:
        - approved
        - declined
        - pending
      description: Current status of the review of this approval request
      title: ExpandableApprovalRequestResponseReviewStatus
    ReviewResponseKind:
      type: string
      enum:
        - approve
        - decline
        - comment
      description: The type of review action to take
      title: ReviewResponseKind
    ReviewResponse:
      type: object
      properties:
        _id:
          type: string
          description: The approval request ID
        kind:
          $ref: '#/components/schemas/ReviewResponseKind'
          description: The type of review action to take
        creationDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of when the request was created
        comment:
          type: string
          description: A comment describing the approval response
        memberId:
          type: string
          description: ID of account member that reviewed request
        serviceTokenId:
          type: string
          description: ID of account service token that reviewed request
      required:
        - _id
        - kind
      title: ReviewResponse
    ExpandableApprovalRequestResponseStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
        - scheduled
      description: Current status of the approval request
      title: ExpandableApprovalRequestResponseStatus
    Instruction:
      type: object
      additionalProperties:
        description: Any type
      title: Instruction
    Instructions:
      type: array
      items:
        $ref: '#/components/schemas/Instruction'
      title: Instructions
    Conflict:
      type: object
      properties:
        instruction:
          $ref: '#/components/schemas/Instruction'
          description: >-
            Instruction in semantic patch format to be applied to the feature
            flag
        reason:
          type: string
          description: Reason why the conflict exists
      title: Conflict
    IntegrationStatus:
      type: object
      properties:
        display:
          type: string
        value:
          type: string
      required:
        - display
        - value
      title: IntegrationStatus
    IntegrationMetadata:
      type: object
      properties:
        externalId:
          type: string
        externalStatus:
          $ref: '#/components/schemas/IntegrationStatus'
        externalUrl:
          type: string
        lastChecked:
          $ref: '#/components/schemas/UnixMillis'
      required:
        - externalId
        - externalStatus
        - externalUrl
        - lastChecked
      title: IntegrationMetadata
    CopiedFromEnv:
      type: object
      properties:
        key:
          type: string
          description: Key of feature flag copied
        version:
          type: integer
          description: Version of feature flag copied
      required:
        - key
      title: CopiedFromEnv
    CustomWorkflowStageMeta:
      type: object
      properties:
        index:
          type: integer
          description: The zero-based index of the workflow stage
        name:
          type: string
          description: The name of the workflow stage
      title: CustomWorkflowStageMeta
    CustomWorkflowMeta:
      type: object
      properties:
        name:
          type: string
          description: The name of the workflow stage that required this approval request
        stage:
          $ref: '#/components/schemas/CustomWorkflowStageMeta'
          description: >-
            Details on the stage of the workflow where this approval request is
            required
      title: CustomWorkflowMeta
    ApprovalSettings:
      type: object
      properties:
        required:
          type: boolean
          description: If approvals are required for this environment
        bypassApprovalsForPendingChanges:
          type: boolean
          description: Whether to skip approvals for pending changes
        minNumApprovals:
          type: integer
          description: >-
            Sets the amount of approvals required before a member can apply a
            change. The minimum is one and the maximum is five.
        canReviewOwnRequest:
          type: boolean
          description: >-
            Allow someone who makes an approval request to apply their own
            change
        canApplyDeclinedChanges:
          type: boolean
          description: >-
            Allow applying the change as long as at least one person has
            approved
        autoApplyApprovedChanges:
          type: boolean
          description: >-
            Automatically apply changes that have been approved by all
            reviewers. This field is only applicable for approval services other
            than LaunchDarkly.
        serviceKind:
          type: string
          description: Which service to use for managing approvals
        serviceConfig:
          type: object
          additionalProperties:
            description: Any type
        requiredApprovalTags:
          type: array
          items:
            type: string
          description: >-
            Require approval only on flags with the provided tags. Otherwise all
            flags will require approval.
        serviceKindConfigurationId:
          type: string
          description: >-
            Optional field for integration configuration ID of a custom approval
            integration. This is an Enterprise-only feature.
      required:
        - required
        - bypassApprovalsForPendingChanges
        - minNumApprovals
        - canReviewOwnRequest
        - canApplyDeclinedChanges
        - serviceKind
        - serviceConfig
        - requiredApprovalTags
      title: ApprovalSettings
    Link:
      type: object
      properties:
        href:
          type: string
          description: The URL of the link
        type:
          type: string
          description: The type of the link
      title: Link
    ClientSideAvailability:
      type: object
      properties:
        usingMobileKey:
          type: boolean
        usingEnvironmentId:
          type: boolean
      title: ClientSideAvailability
    ActionIdentifier:
      type: string
      title: ActionIdentifier
    ActionSpecifier:
      type: string
      title: ActionSpecifier
    AccessDeniedReasonEffect:
      type: string
      enum:
        - allow
        - deny
      description: Whether this statement should allow or deny actions on the resources.
      title: AccessDeniedReasonEffect
    AccessDeniedReason:
      type: object
      properties:
        resources:
          type: array
          items:
            type: string
          description: Resource specifier strings
        notResources:
          type: array
          items:
            type: string
          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.
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          description: Actions to perform on a resource
        notActions:
          type: array
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          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.
        effect:
          $ref: '#/components/schemas/AccessDeniedReasonEffect'
          description: >-
            Whether this statement should allow or deny actions on the
            resources.
        role_name:
          type: string
      required:
        - effect
      title: AccessDeniedReason
    AccessDenied:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/ActionIdentifier'
        reason:
          $ref: '#/components/schemas/AccessDeniedReason'
      required:
        - action
        - reason
      title: AccessDenied
    AccessAllowedReasonEffect:
      type: string
      enum:
        - allow
        - deny
      description: Whether this statement should allow or deny actions on the resources.
      title: AccessAllowedReasonEffect
    AccessAllowedReason:
      type: object
      properties:
        resources:
          type: array
          items:
            type: string
          description: Resource specifier strings
        notResources:
          type: array
          items:
            type: string
          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.
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          description: Actions to perform on a resource
        notActions:
          type: array
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          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.
        effect:
          $ref: '#/components/schemas/AccessAllowedReasonEffect'
          description: >-
            Whether this statement should allow or deny actions on the
            resources.
        role_name:
          type: string
      required:
        - effect
      title: AccessAllowedReason
    AccessAllowedRep:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/ActionIdentifier'
        reason:
          $ref: '#/components/schemas/AccessAllowedReason'
      required:
        - action
        - reason
      title: AccessAllowedRep
    Access:
      type: object
      properties:
        denied:
          type: array
          items:
            $ref: '#/components/schemas/AccessDenied'
        allowed:
          type: array
          items:
            $ref: '#/components/schemas/AccessAllowedRep'
      required:
        - denied
        - allowed
      title: Access
    Environment:
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        _id:
          type: string
          description: >-
            The ID for the environment. Use this as the client-side ID for
            authorization in some client-side SDKs, and to associate
            LaunchDarkly environments with CDN integrations in edge SDKs.
        key:
          type: string
          description: A project-unique key for the new environment
        name:
          type: string
          description: A human-friendly name for the new environment
        apiKey:
          type: string
          description: >-
            The SDK key for the environment. Use this for authorization in
            server-side SDKs.
        mobileKey:
          type: string
          description: >-
            The mobile key for the environment. Use this for authorization in
            mobile SDKs.
        color:
          type: string
          description: The color used to indicate this environment in the UI
        defaultTtl:
          type: integer
          description: >-
            The default time (in minutes) that the PHP SDK can cache feature
            flag rules locally
        secureMode:
          type: boolean
          description: >-
            Ensures that one end user of the client-side SDK cannot inspect the
            variations for another end user
        _access:
          $ref: '#/components/schemas/Access'
        defaultTrackEvents:
          type: boolean
          description: Enables tracking detailed information for new flags by default
        requireComments:
          type: boolean
          description: >-
            Whether members who modify flags and segments through the
            LaunchDarkly user interface are required to add a comment
        confirmChanges:
          type: boolean
          description: >-
            Whether members who modify flags and segments through the
            LaunchDarkly user interface are required to confirm those changes
        tags:
          type: array
          items:
            type: string
          description: A list of tags for this environment
        approvalSettings:
          $ref: '#/components/schemas/ApprovalSettings'
          description: Details about the approval settings for flags in this environment
        resourceApprovalSettings:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ApprovalSettings'
          description: >-
            Details about the approval settings for other resources in this
            environment, organized by resource kind (for example, "aiconfig" and
            "segment")
        critical:
          type: boolean
          description: Whether the environment is critical
      required:
        - _links
        - _id
        - key
        - name
        - apiKey
        - mobileKey
        - color
        - defaultTtl
        - secureMode
        - defaultTrackEvents
        - requireComments
        - confirmChanges
        - tags
        - critical
      title: Environment
    Environments:
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        totalCount:
          type: integer
          description: The number of environments returned
        items:
          type: array
          items:
            $ref: '#/components/schemas/Environment'
          description: An array of environments
      required:
        - items
      title: Environments
    Project:
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        _id:
          type: string
          description: The ID of this project
        key:
          type: string
          description: The key of this project
        includeInSnippetByDefault:
          type: boolean
          description: >-
            Whether or not flags created in this project are made available to
            the client-side JavaScript SDK by default
        defaultClientSideAvailability:
          $ref: '#/components/schemas/ClientSideAvailability'
          description: Describes which client-side SDKs can use new flags by default
        name:
          type: string
          description: A human-friendly name for the project
        _access:
          $ref: '#/components/schemas/Access'
          description: Details on the allowed and denied actions for this project
        tags:
          type: array
          items:
            type: string
          description: A list of tags for the project
        defaultReleasePipelineKey:
          type: string
          description: The key of the default release pipeline for this project
        environments:
          $ref: '#/components/schemas/Environments'
          description: >-
            A paginated list of environments for the project. By default this
            field is omitted unless expanded by the client.
      required:
        - _links
        - _id
        - key
        - includeInSnippetByDefault
        - name
        - tags
      title: Project
    ExpandedFlagRepKind:
      type: string
      enum:
        - boolean
        - multivariate
      description: Kind of feature flag
      title: ExpandedFlagRepKind
    Variation:
      type: object
      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.
      required:
        - value
      title: Variation
    MemberSummary:
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        _id:
          type: string
          description: The member's ID
        firstName:
          type: string
          description: The member's first name
        lastName:
          type: string
          description: The member's last name
        role:
          type: string
          description: >-
            The member's base role. If the member has no additional roles, this
            role will be in effect.
        email:
          type: string
          description: The member's email address
      required:
        - _links
        - _id
        - role
        - email
      title: MemberSummary
    customProperty:
      type: object
      properties:
        name:
          type: string
          description: The name of the custom property of this type.
        value:
          type: array
          items:
            type: string
          description: >-
            An array of values for the custom property data to associate with
            this flag.
      required:
        - name
        - value
      title: customProperty
    CustomProperties:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/customProperty'
      title: CustomProperties
    Defaults:
      type: object
      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.
        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.
      required:
        - onVariation
        - offVariation
      title: Defaults
    ExpandedFlagRep:
      type: object
      properties:
        name:
          type: string
          description: A human-friendly name for the feature flag
        kind:
          $ref: '#/components/schemas/ExpandedFlagRepKind'
          description: Kind of feature flag
        description:
          type: string
          description: Description of the feature flag
        key:
          type: string
          description: A unique key used to reference the flag in your code
        _version:
          type: integer
          description: Version of the feature flag
        creationDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of flag creation date
        includeInSnippet:
          type: boolean
          description: >-
            Deprecated, use <code>clientSideAvailability</code>. Whether this
            flag should be made available to the client-side JavaScript SDK
        clientSideAvailability:
          $ref: '#/components/schemas/ClientSideAvailability'
          description: Which type of client-side SDKs the feature flag is available to
        variations:
          type: array
          items:
            $ref: '#/components/schemas/Variation'
          description: An array of possible variations for the flag
        temporary:
          type: boolean
          description: Whether the flag is a temporary flag
        tags:
          type: array
          items:
            type: string
          description: Tags for the feature flag
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        maintainerId:
          type: string
          description: The ID of the member who maintains the flag
        _maintainer:
          $ref: '#/components/schemas/MemberSummary'
          description: Details on the member who maintains this feature flag
        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.
        archived:
          type: boolean
          description: Boolean indicating if the feature flag is archived
        archivedDate:
          $ref: '#/components/schemas/UnixMillis'
          description: If archived is true, date of archive
        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.
      required:
        - name
        - kind
        - key
        - _version
        - creationDate
        - variations
        - temporary
        - tags
        - _links
        - customProperties
        - archived
      title: ExpandedFlagRep
    AIConfigRep:
      type: object
      properties:
        key:
          type: string
          description: The key of the AI Config
        name:
          type: string
          description: The name of the AI Config
      required:
        - key
        - name
      title: AIConfigRep
    ExpandedExperimentRep:
      type: object
      properties:
        key:
          type: string
          description: The key of the experiment
        name:
          type: string
          description: The name of the experiment
        _access:
          $ref: '#/components/schemas/Access'
      required:
        - key
        - name
      title: ExpandedExperimentRep
    SegmentTarget:
      type: object
      properties:
        values:
          type: array
          items:
            type: string
        contextKind:
          type: string
      title: SegmentTarget
    Operator:
      type: string
      title: Operator
    Clause:
      type: object
      properties:
        _id:
          type: string
        attribute:
          type: string
        op:
          $ref: '#/components/schemas/Operator'
        values:
          type: array
          items:
            description: Any type
        contextKind:
          type: string
        negate:
          type: boolean
      required:
        - attribute
        - op
        - values
        - negate
      title: Clause
    UserSegmentRule:
      type: object
      properties:
        _id:
          type: string
        clauses:
          type: array
          items:
            $ref: '#/components/schemas/Clause'
        weight:
          type: integer
        rolloutContextKind:
          type: string
        bucketBy:
          type: string
        description:
          type: string
      required:
        - clauses
      title: UserSegmentRule
    FlagListingRep:
      type: object
      properties:
        name:
          type: string
          description: The flag name
        key:
          type: string
          description: The flag key
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
        _site:
          $ref: '#/components/schemas/Link'
      required:
        - name
        - key
      title: FlagListingRep
    SegmentId:
      type: string
      title: SegmentId
    SegmentMetadata:
      type: object
      properties:
        envId:
          type: string
        segmentId:
          $ref: '#/components/schemas/SegmentId'
        version:
          type: integer
        includedCount:
          type: integer
        excludedCount:
          type: integer
        lastModified:
          $ref: '#/components/schemas/UnixMillis'
        deleted:
          type: boolean
      title: SegmentMetadata
    UserSegment:
      type: object
      properties:
        name:
          type: string
          description: A human-friendly name for the segment.
        description:
          type: string
          description: >-
            A description of the segment's purpose. Defaults to
            <code>null</code> and is omitted in the response if not provided.
        tags:
          type: array
          items:
            type: string
          description: Tags for the segment. Defaults to an empty array.
        creationDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of when the segment was created
        lastModifiedDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of when the segment was last modified
        key:
          type: string
          description: A unique key used to reference the segment
        included:
          type: array
          items:
            type: string
          description: >-
            An array of keys for included targets. Included individual targets
            are always segment members, regardless of segment rules. For
            list-based segments over 15,000 entries, also called big segments,
            this array is either empty or omitted.
        excluded:
          type: array
          items:
            type: string
          description: >-
            An array of keys for excluded targets. Segment rules bypass
            individual excluded targets, so they will never be included based on
            rules. Excluded targets may still be included explicitly. This value
            is omitted for list-based segments over 15,000 entries, also called
            big segments.
        includedContexts:
          type: array
          items:
            $ref: '#/components/schemas/SegmentTarget'
        excludedContexts:
          type: array
          items:
            $ref: '#/components/schemas/SegmentTarget'
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        rules:
          type: array
          items:
            $ref: '#/components/schemas/UserSegmentRule'
          description: An array of the targeting rules for this segment.
        version:
          type: integer
          description: Version of the segment
        deleted:
          type: boolean
          description: Whether the segment has been deleted
        _access:
          $ref: '#/components/schemas/Access'
        _flags:
          type: array
          items:
            $ref: '#/components/schemas/FlagListingRep'
          description: >-
            A list of flags targeting this segment. Only included when getting a
            single segment, using the <code>getSegment</code> endpoint.
        unbounded:
          type: boolean
          description: >-
            Whether this is a standard segment (<code>false</code>) or a big
            segment (<code>true</code>). Standard segments include rule-based
            segments and smaller list-based segments. Big segments include
            larger list-based segments and synced segments. If omitted, the
            segment is a standard segment.
        unboundedContextKind:
          type: string
          description: For big segments, the targeted context kind.
        generation:
          type: integer
          description: For big segments, how many times this segment has been created.
        _unboundedMetadata:
          $ref: '#/components/schemas/SegmentMetadata'
          description: >-
            Details on the external data store backing this segment. Only
            applies to big segments.
        _external:
          type: string
          description: >-
            The external data store backing this segment. Only applies to synced
            segments.
        _externalLink:
          type: string
          description: >-
            The URL for the external data store backing this segment. Only
            applies to synced segments.
        _importInProgress:
          type: boolean
          description: >-
            Whether an import is currently in progress for the specified
            segment. Only applies to big segments.
      required:
        - name
        - tags
        - creationDate
        - lastModifiedDate
        - key
        - _links
        - rules
        - version
        - deleted
        - generation
      title: UserSegment
    ExpandedResourceRep:
      type: object
      properties:
        kind:
          type: string
          description: The type of resource
        aiConfig:
          $ref: '#/components/schemas/AIConfigRep'
        experiment:
          $ref: '#/components/schemas/ExpandedExperimentRep'
        flag:
          $ref: '#/components/schemas/ExpandedFlagRep'
        segment:
          $ref: '#/components/schemas/UserSegment'
      required:
        - kind
      title: ExpandedResourceRep
    ExpandableApprovalRequestResponse:
      type: object
      properties:
        _id:
          type: string
          description: The ID of this approval request
        _version:
          type: integer
          description: Version of the approval request
        creationDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of when the approval request was created
        serviceKind:
          $ref: '#/components/schemas/ApprovalRequestServiceKind'
          description: >-
            The approval service for this request. May be LaunchDarkly or an
            external approval service, such as ServiceNow or JIRA.
        requestorId:
          type: string
          description: The ID of the member who requested the approval
        description:
          type: string
          description: A human-friendly name for the approval request
        reviewStatus:
          $ref: '#/components/schemas/ExpandableApprovalRequestResponseReviewStatus'
          description: Current status of the review of this approval request
        allReviews:
          type: array
          items:
            $ref: '#/components/schemas/ReviewResponse'
          description: An array of individual reviews of this approval request
        notifyMemberIds:
          type: array
          items:
            type: string
          description: >-
            An array of member IDs. These members are notified to review the
            approval request.
        appliedDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of when the approval request was applied
        appliedByMemberId:
          type: string
          description: The member ID of the member who applied the approval request
        appliedByServiceTokenId:
          type: string
          description: >-
            The service token ID of the service token which applied the approval
            request
        status:
          $ref: '#/components/schemas/ExpandableApprovalRequestResponseStatus'
          description: Current status of the approval request
        instructions:
          $ref: '#/components/schemas/Instructions'
          description: >-
            List of instructions in semantic patch format to be applied to the
            feature flag
        conflicts:
          type: array
          items:
            $ref: '#/components/schemas/Conflict'
          description: Details on any conflicting approval requests
        _links:
          type: object
          additionalProperties:
            description: Any type
          description: The location and content type of related resources
        executionDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp for when instructions will be executed
        operatingOnId:
          type: string
          description: ID of scheduled change to edit or delete
        integrationMetadata:
          $ref: '#/components/schemas/IntegrationMetadata'
          description: >-
            Details about the object in an external service corresponding to
            this approval request, such as a ServiceNow change request or a JIRA
            ticket, if an external approval service is being used
        source:
          $ref: '#/components/schemas/CopiedFromEnv'
          description: Details about the source feature flag, if copied
        customWorkflowMetadata:
          $ref: '#/components/schemas/CustomWorkflowMeta'
          description: >-
            Details about the custom workflow, if this approval request is part
            of a custom workflow
        resourceId:
          type: string
          description: String representation of a resource
        approvalSettings:
          $ref: '#/components/schemas/ApprovalSettings'
          description: The settings for this approval
        project:
          $ref: '#/components/schemas/Project'
          description: Project the approval request belongs to
        environments:
          type: array
          items:
            $ref: '#/components/schemas/Environment'
          description: List of environments the approval impacts
        flag:
          $ref: '#/components/schemas/ExpandedFlagRep'
          description: Flag the approval request belongs to
        resource:
          $ref: '#/components/schemas/ExpandedResourceRep'
          description: Resource the approval request belongs to
      required:
        - _id
        - _version
        - creationDate
        - serviceKind
        - reviewStatus
        - allReviews
        - notifyMemberIds
        - status
        - instructions
        - conflicts
        - _links
      title: ExpandableApprovalRequestResponse
    ExpandableApprovalRequestsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ExpandableApprovalRequestResponse'
          description: An array of approval requests
        totalCount:
          type: integer
          description: Total number of approval requests
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
      required:
        - items
        - totalCount
        - _links
      title: ExpandableApprovalRequestsResponse
    InvalidRequestErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: InvalidRequestErrorRep
    UnauthorizedErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: UnauthorizedErrorRep
    ForbiddenErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: ForbiddenErrorRep
    RateLimitedErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: RateLimitedErrorRep
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

```

## SDK Code Examples

```python
import requests

url = "https://app.launchdarkly.com/api/v2/approval-requests"

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.launchdarkly.com/api/v2/approval-requests';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.launchdarkly.com/api/v2/approval-requests"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.launchdarkly.com/api/v2/approval-requests")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.launchdarkly.com/api/v2/approval-requests")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.launchdarkly.com/api/v2/approval-requests', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.launchdarkly.com/api/v2/approval-requests");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.launchdarkly.com/api/v2/approval-requests")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```