> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List completed merge queue testing for a time range

> Returns the stretches of testing a merge queue completed in the given range, newest first. One entry per pull request per attempt: a pull request appears several times if its testing restarted, and a batched test run appears once per pull request it tested. Testing still in progress is not included. Pass an entry's `testRunId` to `/getMergeQueueTestingDetails` for the run's check suites, statuses and tested pull requests.



## OpenAPI

````yaml /openapi.json post /listMergeQueueTestingResults
openapi: 3.1.0
info:
  title: Trunk APIs
  version: 1.0.0
  license:
    name: UNLICENSED
servers:
  - url: https://api.trunk.io/v1
security: []
paths:
  /listMergeQueueTestingResults:
    post:
      summary: List completed merge queue testing for a time range
      description: >-
        Returns the stretches of testing a merge queue completed in the given
        range, newest first. One entry per pull request per attempt: a pull
        request appears several times if its testing restarted, and a batched
        test run appears once per pull request it tested. Testing still in
        progress is not included. Pass an entry's `testRunId` to
        `/getMergeQueueTestingDetails` for the run's check suites, statuses and
        tested pull requests.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                repo:
                  type: object
                  properties:
                    host:
                      type: string
                      description: The host of the repository.
                      examples:
                        - github.com
                    owner:
                      type: string
                      description: The owner of the repository.
                      examples:
                        - trunk-io
                    name:
                      type: string
                      description: The name of the repository.
                      examples:
                        - trunk
                  required:
                    - host
                    - owner
                    - name
                  description: The repository whose merge queue ran the testing.
                targetBranch:
                  type: string
                  description: The target branch of the merge queue.
                  examples:
                    - main
                since:
                  type: string
                  format: date-time
                  description: >-
                    ISO 8601 timestamp (inclusive). Only testing that finished
                    at or after this time is returned. Must be no more than 45
                    days before `until`; merge metrics are retained for 45 days,
                    so anything earlier returns nothing.
                  examples:
                    - '2024-01-01T00:00:00Z'
                until:
                  type: string
                  format: date-time
                  description: >-
                    ISO 8601 timestamp (inclusive) bounding the upper end of the
                    range. Defaults to now.
                  examples:
                    - '2024-01-08T00:00:00Z'
                offset:
                  type: integer
                  minimum: 0
                  default: 0
                  description: Number of results to skip. Defaults to 0.
                take:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 50
                  description: Number of results to return (1-100). Defaults to 50.
              required:
                - repo
                - targetBranch
                - since
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  testingResults:
                    type: array
                    items:
                      type: object
                      properties:
                        prNumber:
                          type: number
                          description: The pull request number on the Git provider.
                        endedAt:
                          type: string
                          description: >-
                            ISO 8601 timestamp of when this stretch of testing
                            ended. Recorded to whole-second precision. This is
                            the end of the testing itself, not of the pull
                            request's queue attempt — see `cycleConclusion`.
                        testingDurationMs:
                          type: number
                          description: >-
                            How long this stretch of testing lasted, in
                            milliseconds. Recorded to whole-second precision, so
                            this is always a multiple of 1000.
                        outcome:
                          type: string
                          enum:
                            - passed
                            - failed
                            - interrupted
                            - cancelled
                          description: >-
                            How this stretch of testing ended. `passed` — the
                            test run completed and passed (including a
                            successful bisection step). `failed` — the test run
                            completed and failed, or the pull request entered
                            bisection. `interrupted` — testing was cut short and
                            will be retried (a restart, a preempt, or a base
                            branch change). `cancelled` — the pull request left
                            the queue while testing.
                        cycleConclusion:
                          type: string
                          enum:
                            - merged
                            - failed
                            - cancelled
                          description: >-
                            How the pull request's queue attempt ultimately
                            ended. Absent while the attempt is still in flight.
                        bisection:
                          type: string
                          enum:
                            - in_bisection
                            - entered_bisection
                          description: >-
                            The pull request's relationship to bisection at this
                            point. `entered_bisection` — this is the failure
                            that caused its batch to be split. `in_bisection` —
                            this testing was itself part of a bisection. Absent
                            when bisection was not involved. A result that is
                            both is reported as `entered_bisection`.
                        testRunId:
                          type: string
                          description: >-
                            The test run this testing belongs to; pass it to
                            `/getMergeQueueTestingDetails` for the run's check
                            suites, statuses and tested pull requests. Absent on
                            results recorded before test run IDs were tracked on
                            these events.
                      required:
                        - prNumber
                        - testingDurationMs
                    description: >-
                      Completed stretches of merge queue testing, newest first.
                      One entry per pull request per attempt, so a pull request
                      appears several times if its testing restarted, and a
                      batched test run appears once per pull request it tested.
                      Testing still in progress is not included.
                  totalItems:
                    type: number
                    description: >-
                      The total number of results matching the request, ignoring
                      `offset` and `take`.
                required:
                  - testingResults
                  - totalItems
        '400':
          description: Bad Request
          content:
            application/plain-text:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            application/plain-text:
              schema:
                type: string
        '404':
          description: Not Found
          content:
            application/plain-text:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            application/plain-text:
              schema:
                type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-token

````