---
title: "Get the details of a test case"
method: POST
path: "/flaky-tests/get-test-details"
---

# Get the details of a test case

`POST /flaky-tests/get-test-details`

## Request body

- object
  - `repo` object, required — The repository to list tests for.
    - `host` string, required — The host of the repository. For example, `github.com` or `gitlab.com`. If self-hosting, this will be the hostname of your instance.
    - `owner` string, required — 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.
    - `name` string, required — The name of the repository.
  - `org_url_slug` string, required — The slug of your organization. Find this at https://app.trunk.io/trunk/settings under "Organization Name" > "Slug"
  - `test_id` string, uuid, required — The id of a test case. Should be a UUID.

## Response `200`

OK

- object
  - `test` object, required — The details of a test case.
    - `id` string, uuid, required — A stable unique identifier for the test
    - `repository` object, required
      - `html_url` string, uri, required — The URL of the repository
    - `html_url` string, uri, required — The URL of the test details
    - `name` string, required — The name of the test
    - `variant` string, required — The name of the test variant
    - `status` object, required
      - `value` 'healthy' | 'flaky' | 'broken', required — The current status value in lowercase
      - `reason` string, required — The reason for the current status
      - `timestamp` string, date-time, required — The timestamp of the current status change
    - `most_common_failures` object[], required — 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.
      - `summary` string, required — The summary of the failure
      - `occurrence_count` integer, required — The number of occurrences of this failure
      - `last_occurrence` string, date-time — The timestamp of the last occurrence
    - `failure_rate_last_7d` number, required — The failure rate over the last 7 days
    - `failure_rate_last_24h` number, required — The failure rate over the last 24 hours
    - `file_path` string — The file path of the test
    - `parent` string — The parent of the test. This includes the test suite (depending on the test runner)
    - `classname` string — The class name of the test
    - `codeowners` string[], required — Code owners for the test
    - `pull_requests_impacted_last_7d` integer, required — The number of pull requests impacted in the last 7 days
    - `quarantined` boolean, required — 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` object
      - `html_url` string, uri, required — The URL of the associated ticket

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/trunk/apis/trunk-apis.md) · [All operations](https://skmtc.net/trunk/apis/trunk-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trunk/trunk-apis/versions/f7b911d8e24c/schema)
