> ## 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.

# Get the details of a test case



## OpenAPI

````yaml /openapi.json post /flaky-tests/get-test-details
openapi: 3.1.0
info:
  title: Trunk APIs
  version: 1.0.0
  license:
    name: UNLICENSED
servers:
  - url: https://api.trunk.io/v1
security: []
paths:
  /flaky-tests/get-test-details:
    post:
      summary: Get the details of a test case
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                repo:
                  type: object
                  properties:
                    host:
                      type: string
                      description: >-
                        The host of the repository. For example, `github.com` or
                        `gitlab.com`. If self-hosting, this will be the hostname
                        of your instance.
                      examples:
                        - github.com
                        - gitlab.com
                        - github-enterprise.my-org-tld.com
                        - gitlab-enterprise.my-org-tld.com
                    owner:
                      type: string
                      description: >-
                        The owner of the repository. For example,
                        `my-github-org` or `my-gitlab-org/my/sub/group`. `owner`
                        for GitLab will include the GitLab org, plus the project
                        path, but excluding the repo name itself.
                      examples:
                        - my-github-org
                        - my-gitlab-org/my/sub/group
                    name:
                      type: string
                      description: The name of the repository.
                      examples:
                        - my-repo
                  required:
                    - host
                    - owner
                    - name
                  description: The repository to list tests for.
                org_url_slug:
                  type: string
                  description: >-
                    The slug of your organization. Find this at
                    https://app.trunk.io/trunk/settings under "Organization
                    Name" > "Slug"
                  examples:
                    - my-trunk-org-slug
                test_id:
                  type: string
                  format: uuid
                  description: The id of a test case. Should be a UUID.
                  examples:
                    - 01234567-0123-0123-0123-0123456789ab
              required:
                - repo
                - org_url_slug
                - test_id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  test:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: A stable unique identifier for the test
                      repository:
                        type: object
                        properties:
                          html_url:
                            type: string
                            format: uri
                            description: The URL of the repository
                        required:
                          - html_url
                      html_url:
                        type: string
                        format: uri
                        description: The URL of the test details
                      name:
                        type: string
                        description: The name of the test
                      variant:
                        type: string
                        description: The name of the test variant
                      status:
                        type: object
                        properties:
                          value:
                            type: string
                            enum:
                              - healthy
                              - flaky
                              - broken
                            description: The current status value in lowercase
                          reason:
                            type: string
                            description: The reason for the current status
                          timestamp:
                            type: string
                            format: date-time
                            description: The timestamp of the current status change
                        required:
                          - value
                          - reason
                          - timestamp
                      most_common_failures:
                        type: array
                        items:
                          type: object
                          properties:
                            summary:
                              type: string
                              description: The summary of the failure
                            occurrence_count:
                              type: integer
                              minimum: 0
                              description: The number of occurrences of this failure
                            last_occurrence:
                              type: string
                              format: date-time
                              description: The timestamp of the last occurrence
                          required:
                            - summary
                            - occurrence_count
                        description: >-
                          Several of the most common failures of the test. This
                          is behind a feature flag, access to this feature can
                          be requested by reaching out to the Trunk team.
                      failure_rate_last_7d:
                        type: number
                        description: The failure rate over the last 7 days
                      failure_rate_last_24h:
                        type: number
                        description: The failure rate over the last 24 hours
                      file_path:
                        type: string
                        description: The file path of the test
                      parent:
                        type: string
                        description: >-
                          The parent of the test. This includes the test suite
                          (depending on the test runner)
                      classname:
                        type: string
                        description: The class name of the test
                      codeowners:
                        type: array
                        items:
                          type: string
                        description: Code owners for the test
                      pull_requests_impacted_last_7d:
                        type: integer
                        minimum: 0
                        description: >-
                          The number of pull requests impacted in the last 7
                          days
                      quarantined:
                        type: boolean
                        description: |-
                          Whether the test is quarantined.

                            This is `true` when quarantining is enabled for the repo and either of the following applies:

                            - The quarantine override is set to `ALWAYS_QUARANTINE` for this test
                            - Automatic quarantining is enabled for the repo, and this test's status is either `flaky` or `broken`

                            If this is `true`, the next test run will be marked as passed even if the test run conclusion is
                            failed.
                      ticket:
                        type: object
                        properties:
                          html_url:
                            type: string
                            format: uri
                            description: The URL of the associated ticket
                        required:
                          - html_url
                    required:
                      - id
                      - repository
                      - html_url
                      - name
                      - variant
                      - status
                      - most_common_failures
                      - failure_rate_last_7d
                      - failure_rate_last_24h
                      - codeowners
                      - pull_requests_impacted_last_7d
                      - quarantined
                    description: The details of a test case.
                required:
                  - test
        '401':
          description: Unauthorized
          content:
            application/plain-text:
              schema:
                type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-token

````