> ## 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 pull requests

> > 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 pull requests

### Expanding the pull request collection response

LaunchDarkly supports expanding the pull request collection response to include additional fields.

To expand the response, append the `expand` query parameter and include the following:

* `deployments` includes details on all of the deployments associated with each pull request
* `flagReferences` includes details on all of the references to flags in each pull request
* `leadTime` includes details about the lead time of the pull request for each stage

For example, use `?expand=deployments` to include the `deployments` field in the response. By default, this field is **not** included in the response.




## OpenAPI

````yaml /openapi/launchdarkly-api.json get /api/v2/engineering-insights/pull-requests
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/engineering-insights/pull-requests:
    get:
      tags:
        - Insights pull requests (beta)
      summary: List pull requests
      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 pull requests


        ### Expanding the pull request collection response


        LaunchDarkly supports expanding the pull request collection response to
        include additional fields.


        To expand the response, append the `expand` query parameter and include
        the following:


        * `deployments` includes details on all of the deployments associated
        with each pull request

        * `flagReferences` includes details on all of the references to flags in
        each pull request

        * `leadTime` includes details about the lead time of the pull request
        for each stage


        For example, use `?expand=deployments` to include the `deployments`
        field in the response. By default, this field is **not** included in the
        response.
      operationId: getPullRequests
      parameters:
        - name: projectKey
          in: query
          description: The project key
          required: true
          schema:
            type: string
            format: string
            description: The project key
        - name: environmentKey
          in: query
          description: >-
            Required if you are using the <code>sort</code> parameter's
            <code>leadTime</code> option to sort pull requests.
          schema:
            type: string
            format: string
            description: >-
              Required if you are using the <code>sort</code> parameter's
              <code>leadTime</code> option to sort pull requests.
        - name: applicationKey
          in: query
          description: >-
            Filter the results to pull requests deployed to a comma separated
            list of applications
          schema:
            type: string
            format: string
            description: >-
              Filter the results to pull requests deployed to a comma separated
              list of applications
        - name: status
          in: query
          description: >-
            Filter results to pull requests with the given status. Options:
            `open`, `merged`, `closed`, `deployed`.
          schema:
            type: string
            format: string
            description: >-
              Filter results to pull requests with the given status. Options:
              `open`, `merged`, `closed`, `deployed`.
        - name: query
          in: query
          description: Filter list of pull requests by title or author
          schema:
            type: string
            format: string
            description: Filter list of pull requests by title or author
        - name: limit
          in: query
          description: >-
            The number of pull requests to return. Default is 20. Maximum
            allowed is 100.
          schema:
            type: integer
            format: int64
            description: >-
              The number of pull requests to return. Default is 20. Maximum
              allowed is 100.
        - name: expand
          in: query
          description: >-
            Expand properties in response. Options: `deployments`,
            `flagReferences`, `leadTime`.
          schema:
            type: string
            format: string
            description: >-
              Expand properties in response. Options: `deployments`,
              `flagReferences`, `leadTime`.
        - name: sort
          in: query
          description: >-
            Sort results. Requires the `environmentKey` to be set. Options:
            `leadTime` (asc) and `-leadTime` (desc). When query option is
            excluded, default sort is by created or merged date.
          schema:
            type: string
            format: string
            description: >-
              Sort results. Requires the `environmentKey` to be set. Options:
              `leadTime` (asc) and `-leadTime` (desc). When query option is
              excluded, default sort is by created or merged date.
        - name: from
          in: query
          description: Unix timestamp in milliseconds. Default value is 7 days ago.
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          description: Unix timestamp in milliseconds. Default value is now.
          schema:
            type: string
            format: date-time
        - name: after
          in: query
          description: Identifier used for pagination
          schema:
            type: string
            format: string
            description: Identifier used for pagination
        - name: before
          in: query
          description: Identifier used for pagination
          schema:
            type: string
            format: string
            description: Identifier used for pagination
      responses:
        '200':
          description: Pull request collection response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestCollectionRep'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationFailedErrorRep'
        '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:
    PullRequestCollectionRep:
      type: object
      required:
        - totalCount
        - items
      properties:
        totalCount:
          type: integer
          description: The total number of pull requests
          example: 25
        items:
          type: array
          description: A list of pull requests
          items:
            $ref: '#/components/schemas/PullRequestRep'
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
          example:
            next:
              href: >-
                /api/v2/engineering-insights/pull-requests?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5
              type: application/json
            self:
              href: /api/v2/engineering-insights/pull-requests
              type: application/json
    ValidationFailedErrorRep:
      type: object
      required:
        - code
        - message
        - errors
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: invalid_request
        message:
          type: string
          description: Description of the error
          example: validation failed
        errors:
          type: array
          description: List of validation errors
          items:
            $ref: '#/components/schemas/FailureReasonRep'
    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.
    PullRequestRep:
      type: object
      required:
        - id
        - externalId
        - title
        - status
        - author
        - createTime
        - baseCommitKey
        - headCommitKey
        - filesChanged
        - linesAdded
        - linesDeleted
        - url
      properties:
        id:
          type: string
          format: uuid
          description: The pull request internal ID
          example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
        externalId:
          type: string
          description: The pull request number
          example: '1234'
        title:
          type: string
          description: The pull request title
          example: Enable new payment structure
        status:
          type: string
          description: The pull request status
          example: merged
        author:
          type: string
          description: The pull request author
          example: jane.doe
        createTime:
          $ref: '#/components/schemas/UnixMillis'
          description: The pull request create time
          example: '1706701522000'
        mergeTime:
          $ref: '#/components/schemas/UnixMillis'
          description: The pull request merge time
          example: '1706712518000'
        mergeCommitKey:
          type: string
          description: The pull request merge commit key
          example: a90a8a2
        baseCommitKey:
          type: string
          description: The pull request base commit key
          example: a90a8a2
        headCommitKey:
          type: string
          description: The pull request head commit key
          example: a90a8a2
        filesChanged:
          type: integer
          description: The number of files changed
          example: 2
        linesAdded:
          type: integer
          description: The number of lines added
          example: 100
        linesDeleted:
          type: integer
          description: The number of lines deleted
          example: 50
        url:
          type: string
          description: The pull request URL
          example: https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406
        deployments:
          $ref: '#/components/schemas/DeploymentCollectionRep'
          description: A list of deployments associated with the pull request
        flagReferences:
          $ref: '#/components/schemas/FlagReferenceCollectionRep'
          description: A list of flag references associated with the pull request
        leadTime:
          $ref: '#/components/schemas/PullRequestLeadTimeRep'
          description: The lead time for the pull request in a given environment
    Link:
      type: object
      properties:
        href:
          type: string
        type:
          type: string
    FailureReasonRep:
      type: object
      required:
        - attribute
        - reason
      properties:
        attribute:
          type: string
          description: The attribute that failed validation
          example: projectKey
        reason:
          type: string
          description: The reason the attribute failed validation
          example: must be present
    UnixMillis:
      type: integer
      format: int64
    DeploymentCollectionRep:
      type: object
      required:
        - totalCount
        - items
      properties:
        totalCount:
          type: integer
          description: The total number of deployments
          example: 25
        items:
          type: array
          description: A list of deployments
          items:
            $ref: '#/components/schemas/DeploymentRep'
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
          example:
            next:
              href: >-
                /api/v2/engineering-insights/deployments?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5
              type: application/json
            self:
              href: /api/v2/engineering-insights/deployments
              type: application/json
    FlagReferenceCollectionRep:
      type: object
      required:
        - totalCount
        - items
      properties:
        totalCount:
          type: integer
          description: The total number of flag references
          example: 25
        items:
          type: array
          description: A list of flag references
          items:
            $ref: '#/components/schemas/FlagReferenceRep'
    PullRequestLeadTimeRep:
      type: object
      required:
        - codingDurationMs
      properties:
        codingDurationMs:
          type: integer
          format: int64
          description: The coding duration in milliseconds
          example: 1000000
        reviewDurationMs:
          type: integer
          format: int64
          description: The review duration in milliseconds
          example: 500000
        maxWaitDurationMs:
          type: integer
          format: int64
          description: >-
            The max wait duration between merge time and deploy start time in
            milliseconds
          example: 100000
        avgWaitDurationMs:
          type: integer
          format: int64
          description: >-
            The average wait duration between merge time and deploy start time
            in milliseconds
          example: 100000
        maxDeployDurationMs:
          type: integer
          format: int64
          description: The max deploy duration in milliseconds
          example: 100000
        avgDeployDurationMs:
          type: integer
          format: int64
          description: The average deploy duration in milliseconds
          example: 100000
        maxTotalLeadTimeMs:
          type: integer
          format: int64
          description: The max total lead time in milliseconds
          example: 1600000
        avgTotalLeadTimeMs:
          type: integer
          format: int64
          description: The average total lead time in milliseconds
          example: 1600000
    DeploymentRep:
      type: object
      required:
        - id
        - applicationKey
        - applicationVersion
        - startedAt
        - status
        - kind
        - active
        - archived
        - environmentKey
        - numberOfContributors
        - numberOfPullRequests
        - linesAdded
        - linesDeleted
        - leadTime
      properties:
        id:
          type: string
          format: uuid
          description: The deployment ID
          example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
        applicationKey:
          type: string
          description: The application key
          example: billing-service
        applicationVersion:
          type: string
          description: The application version
          example: a90a8a2
        startedAt:
          $ref: '#/components/schemas/UnixMillis'
          description: The time the deployment started
          example: '1706701522000'
        endedAt:
          $ref: '#/components/schemas/UnixMillis'
          description: The time the deployment ended
          example: '1706712518000'
        durationMs:
          type: integer
          format: int64
          description: The duration of the deployment in milliseconds
          example: 10996000
        status:
          $ref: '#/components/schemas/DeploymentStatus'
          description: The status of the deployment
          example: finished
        kind:
          $ref: '#/components/schemas/DeploymentKind'
          description: The kind of deployment
          example: redeployment
        active:
          type: boolean
          description: Whether the deployment is active
          example: true
        metadata:
          type: object
          additionalProperties: {}
          description: The metadata associated with the deployment
          example:
            buildNumber: '1234'
        archived:
          type: boolean
          description: Whether the deployment is archived
          example: false
        environmentKey:
          type: string
          description: The environment key
          example: production
        numberOfContributors:
          type: integer
          description: The number of contributors
          example: 1
        numberOfPullRequests:
          type: integer
          description: The number of pull requests
          example: 2
        linesAdded:
          type: integer
          format: int64
          description: The number of lines added
          example: 100
        linesDeleted:
          type: integer
          format: int64
          description: The number of lines deleted
          example: 50
        leadTime:
          type: integer
          format: int64
          description: >-
            The total lead time from first commit to deployment end in
            milliseconds
          example: 20237000
        pullRequests:
          $ref: '#/components/schemas/PullRequestCollectionRep'
          description: The pull requests contained in the deployment
        flagReferences:
          $ref: '#/components/schemas/FlagReferenceCollectionRep'
          description: The flag references contained in the deployment
        leadTimeStages:
          $ref: '#/components/schemas/LeadTimeStagesRep'
          description: The lead time stages for the deployment
    FlagReferenceRep:
      type: object
      required:
        - projectKey
        - flagKey
        - referencesAdded
        - referencesRemoved
      properties:
        projectKey:
          type: string
          description: The project key
          example: default
        flagKey:
          type: string
          description: The flag key
          example: enable-new-payment-structure
        referencesAdded:
          type: integer
          description: The number of references added
          example: 2
        referencesRemoved:
          type: integer
          description: The number of references removed
          example: 5
    DeploymentStatus:
      type: string
    DeploymentKind:
      type: string
    LeadTimeStagesRep:
      type: object
      required:
        - codingDurationMs
      properties:
        codingDurationMs:
          type: integer
          format: int64
          description: The coding duration in milliseconds
          example: 1000000
        reviewDurationMs:
          type: integer
          format: int64
          description: The review duration in milliseconds
          example: 500000
        waitDurationMs:
          type: integer
          format: int64
          description: >-
            The wait duration between merge time and deploy start time in
            milliseconds
          example: 100000
        deployDurationMs:
          type: integer
          format: int64
          description: The deploy duration in milliseconds
          example: 100000
        totalLeadTimeMs:
          type: integer
          format: int64
          description: The total lead time in milliseconds
          example: 1600000
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````