Skip to main content
POST
/
flaky-tests
/
get-test-details
Get the details of a test case
curl --request POST \
  --url https://api.trunk.io/v1/flaky-tests/get-test-details \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "repo": {
    "host": "<string>",
    "owner": "<string>",
    "name": "<string>"
  },
  "org_url_slug": "<string>",
  "test_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "test": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "repository": {
      "html_url": "<string>"
    },
    "html_url": "<string>",
    "name": "<string>",
    "variant": "<string>",
    "status": {
      "reason": "<string>",
      "timestamp": "2023-11-07T05:31:56Z"
    },
    "most_common_failures": [
      {
        "summary": "<string>",
        "occurrence_count": 1,
        "last_occurrence": "2023-11-07T05:31:56Z"
      }
    ],
    "failure_rate_last_7d": 123,
    "failure_rate_last_24h": 123,
    "codeowners": [
      "<string>"
    ],
    "pull_requests_impacted_last_7d": 1,
    "quarantined": true,
    "file_path": "<string>",
    "parent": "<string>",
    "classname": "<string>",
    "ticket": {
      "html_url": "<string>"
    }
  }
}

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.

Authorizations

x-api-token
string
header
required

Body

application/json
repo
object
required

The repository to list tests for.

org_url_slug
string
required

The slug of your organization. Find this at https://app.trunk.io/trunk/settings under "Organization Name" > "Slug"

Example:

"my-trunk-org-slug"

test_id
string<uuid>
required

The id of a test case. Should be a UUID.

Example:

"01234567-0123-0123-0123-0123456789ab"

Response

OK

test
object
required

The details of a test case.