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

# Get pull request

> Get a pull request with all of its QA.tech reviews, newest first, including each review's result and the markdown body posted on the pull request.

For the tests a review ran, call `get_chat_conversation` with `reviewConversationShortId`.



## OpenAPI

````yaml /api-reference/api.json get /v1/pull-requests/{pullRequestId}
openapi: 3.0.0
info:
  title: QA.tech API
  version: 1.0.0
  contact:
    name: QA.tech
    url: https://qa.tech
    email: support@qa.tech
  description: API for triggering and managing AI-powered test runs
servers:
  - url: https://api.qa.tech
    description: Production
    variables: {}
security:
  - BearerAuth: []
tags:
  - name: Runs
  - name: Infrastructure
  - name: Test Cases
  - name: Application Builds
  - name: Status badge
  - name: Remote Tunnels
  - name: Chat
  - name: Applications
  - name: Features
  - name: Metrics
  - name: Projects
  - name: Knowledge
  - name: Rules
  - name: Configs
  - name: Labels
  - name: Scenarios
  - name: Crawling
  - name: Pull requests
  - name: Issues
  - name: Todos
  - name: Automations
  - name: Test plans
  - name: Integrations
paths:
  /v1/pull-requests/{pullRequestId}:
    get:
      tags:
        - Pull requests
      summary: Get pull request
      description: >-
        Get a pull request with all of its QA.tech reviews, newest first,
        including each review's result and the markdown body posted on the pull
        request.


        For the tests a review ran, call `get_chat_conversation` with
        `reviewConversationShortId`.
      operationId: GetPullRequest
      parameters:
        - name: pullRequestId
          in: path
          required: true
          schema:
            type: string
        - name: query
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/GetPullRequestQuery'
          explode: false
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPullRequestResponse'
components:
  schemas:
    GetPullRequestQuery:
      type: object
      properties:
        projectShortId:
          allOf:
            - $ref: '#/components/schemas/ProjectShortId'
          description: >-
            Target a specific project by its prefixed short ID
            (proj-slug_shortId or proj_shortId), as returned by the projects
            API. Required for organization-scoped API keys; project-scoped keys
            may only pass their own project's short ID.
    GetPullRequestResponse:
      type: object
      required:
        - id
        - provider
        - repository
        - number
        - title
        - state
        - author
        - headRef
        - baseRef
        - url
        - dashboardUrl
        - reviewConversationShortId
        - latestReview
        - createdAt
        - mergedAt
        - closedAt
        - reviews
      properties:
        id:
          type: string
          description: Pull request id (UUID). Pass it to `get_pull_request`.
        provider:
          type: string
          description: '`github` or `gitlab`.'
        repository:
          type: string
          description: Repository as `owner/name`.
        number:
          type: integer
          format: int32
        title:
          type: string
        state:
          type: string
          enum:
            - open
            - merged
            - closed
        author:
          type: string
          nullable: true
        headRef:
          type: string
        baseRef:
          type: string
        url:
          type: string
          description: Pull request URL on the provider.
        dashboardUrl:
          type: string
          description: Dashboard URL for the pull request.
        reviewConversationShortId:
          type: string
          allOf:
            - $ref: '#/components/schemas/ChatConversationShortId'
          nullable: true
          description: >-
            Short ID of the pull request's review conversation. Pass it to
            `get_chat_conversation` for the review's runs and messages.
        latestReview:
          type: object
          allOf:
            - $ref: '#/components/schemas/PullRequestReviewSummary'
          nullable: true
          description: >-
            The most recent review, or null if QA.tech has not reviewed the pull
            request.
        createdAt:
          type: string
          format: date-time
        mergedAt:
          type: string
          format: date-time
          nullable: true
        closedAt:
          type: string
          format: date-time
          nullable: true
        reviews:
          type: array
          items:
            $ref: '#/components/schemas/PullRequestReview'
      description: A pull request with all of its reviews, newest first.
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    ChatConversationShortId:
      type: string
      pattern: ^chat(-.+_.+|_.+)$
    PullRequestReviewSummary:
      type: object
      required:
        - id
        - status
        - result
        - summary
        - headSha
        - createdAt
        - completedAt
      properties:
        id:
          type: string
          description: Review id (UUID)
        status:
          type: string
          enum:
            - pending
            - awaiting_approval
            - completed
            - failed
            - skipped
          description: >-
            `pending` while it runs and `awaiting_approval` while it waits for a
            deployment, then `completed`, `failed`, or `skipped` (triage decided
            not to review).
        result:
          type: string
          enum:
            - fully_verified
            - partially_verified
            - cant_verify
            - bugs_found
          nullable: true
          description: >-
            The review result once it finishes: `fully_verified`,
            `partially_verified`, `cant_verify`, or `bugs_found`. Null while the
            review runs or when it ended without a verdict.
        summary:
          type: string
          nullable: true
          description: One-line summary of the review, if any.
        headSha:
          type: string
          nullable: true
          description: Commit SHA the review tested.
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
      description: A QA.tech review of one pull request commit.
    PullRequestReview:
      type: object
      required:
        - id
        - status
        - result
        - summary
        - headSha
        - createdAt
        - completedAt
        - body
        - reviewUrl
      properties:
        id:
          type: string
          description: Review id (UUID)
        status:
          type: string
          enum:
            - pending
            - awaiting_approval
            - completed
            - failed
            - skipped
          description: >-
            `pending` while it runs and `awaiting_approval` while it waits for a
            deployment, then `completed`, `failed`, or `skipped` (triage decided
            not to review).
        result:
          type: string
          enum:
            - fully_verified
            - partially_verified
            - cant_verify
            - bugs_found
          nullable: true
          description: >-
            The review result once it finishes: `fully_verified`,
            `partially_verified`, `cant_verify`, or `bugs_found`. Null while the
            review runs or when it ended without a verdict.
        summary:
          type: string
          nullable: true
          description: One-line summary of the review, if any.
        headSha:
          type: string
          nullable: true
          description: Commit SHA the review tested.
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
        body:
          type: string
          nullable: true
          description: Markdown review body, as posted on the pull request.
        reviewUrl:
          type: string
          nullable: true
          description: URL of the review comment on the provider, if one was posted.
      description: A review with the text QA.tech posted on the pull request.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.