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

# Get test run details

> Returns detailed information about a single test run, including test stats (pass/fail/skip/flaky counts),
git metadata (branch, commit, PR), tag stats, error categorization, and a deep-link URL to the TestDino UI.

**No query parameters.** Optional `include` sections from the previous API are not supported on this route.




## OpenAPI

````yaml /api-reference/openapi.yml get /{projectId}/test-runs/{runId}
openapi: 3.0.3
info:
  title: TestDino Public API
  version: 1.0.0
  description: >
    Public API for TestDino — read-only access to test analytics, manual tests,
    and project data.


    **17 read-only GET endpoints** organized into 12 sections. Query parameters
    are **endpoint-specific** —

    see each operation for supported filters, enums, and defaults.


    ## Authentication


    All endpoints require a Bearer token in the `Authorization` header:

    ```

    Authorization: Bearer td_pat_<token>

    ```


    Use a user PAT (`td_pat_` prefix) scoped to the organization/project.


    ## Rate Limiting


    - **Per-token:** 100 requests/minute

    - **Per-IP (pre-auth):** 200 requests/minute

    - **PDF generation:** 1 request/minute per token


    Standard headers: `RateLimit-Limit`, `RateLimit-Remaining`,
    `RateLimit-Reset`


    ## Response Format


    **Success:**

    ```json

    { "success": true, "data": { ... }, "pagination": { ... } }

    ```


    **Error:**

    ```json

    { "success": false, "error": { "code": "ERROR_CODE", "message":
    "Human-readable message" } }

    ```


    ## Time windows and date filters


    There is **no global date-filter convention**. Each endpoint documents its
    own parameters:


    | Endpoint family | Parameter | Allowed values |

    |-----------------|-----------|------------------|

    | Test runs list | `start_date`, `end_date` | RFC3339 timestamps (both
    required together) |

    | Explorer, specs, analytics | `days` | Integer snapped to **7, 30, or 90**
    (see each endpoint) |

    | Test runs list | — | No preset `period` / `dateRange` params |

    | Dashboard, filters | — | **No query params** (fixed downstream snapshot) |


    ## Served by


    This contract is served by the **MCP service** (the gateway), which
    authenticates the `td_pat_`

    user PAT and fans out to data-handler / tcm / user-service / billing. It is
    **read-only** —

    webhook subscription management (the previous public API's only write
    surface) is owned by the

    **integration service** and is not part of this contract.


    ## Implementation status


    All 17 routes are mounted (auth + rate-limit). Most call their real
    downstream today; a few

    still have lean shapes or pending owners (notably `usage` → billing). Live
    vs pending detail:

    `docs/DOWNSTREAM_WORK.md`.
  contact:
    name: TestDino Support
    url: https://docs.testdino.com
servers:
  - url: https://api.testdino.com/api/v1/public
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Token Info
    description: Token introspection and project metadata
  - name: Test Runs
    description: List, inspect, and drill into test runs
  - name: Test Cases
    description: Automated test case details and history
  - name: Specs
    description: Project-level spec file health
  - name: Manual Tests
    description: Manual test suites and cases (read-only)
  - name: Test Case Explorer
    description: Aggregated test case metrics explorer
  - name: Context
    description: >-
      Debugging payload at three levels (run / suite / test) — error, steps,
      failure window, attempts, attachments, trace, deep links, and a copy-paste
      retry command. Designed for AI agents and CI scripts.
  - name: Dashboard
    description: Project health overview
  - name: Filters
    description: Available filter values (environments, branches, developers, tags)
  - name: Reports
    description: PDF report generation and download
  - name: Analytics
    description: Consolidated analytics summary and test case execution performance
  - name: Usage
    description: Subscription usage and limits
paths:
  /{projectId}/test-runs/{runId}:
    get:
      tags:
        - Test Runs
      summary: Get test run details
      description: >
        Returns detailed information about a single test run, including test
        stats (pass/fail/skip/flaky counts),

        git metadata (branch, commit, PR), tag stats, error categorization, and
        a deep-link URL to the TestDino UI.


        **No query parameters.** Optional `include` sections from the previous
        API are not supported on this route.
      parameters:
        - $ref: '#/components/parameters/projectId'
        - name: runId
          in: path
          required: true
          schema:
            type: string
          description: The test run identifier (e.g. `test_run_abc123`).
      responses:
        '200':
          description: Test run detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/TestRunDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    projectId:
      name: projectId
      in: path
      required: true
      schema:
        type: string
      description: >-
        The project identifier (e.g. `project_abc123`). Must match the project
        associated with your PAT.
  schemas:
    TestRunDetail:
      allOf:
        - $ref: '#/components/schemas/TestRunListItem'
        - type: object
          properties:
            errorCategory:
              type: object
            liveStats:
              type: object
            tagStats:
              type: array
              items:
                type: object
            errorGroups:
              type: array
              description: Grouped error failures when returned by downstream.
              items:
                type: object
            coverage:
              type: object
              nullable: true
              description: Code coverage metrics when returned by downstream.
            specs:
              type: array
              description: >-
                Spec files with flattened test cases when returned by
                downstream.
              items:
                type: object
            artifacts:
              type: object
              nullable: true
              description: Artifact download URLs when returned by downstream.
    TestRunListItem:
      type: object
      properties:
        id:
          type: string
        counter:
          type: integer
        status:
          type: string
          enum:
            - passed
            - failed
            - interrupted
            - incomplete
            - running
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        duration:
          type: integer
        testStats:
          $ref: '#/components/schemas/TestStats'
        metadata:
          type: object
          properties:
            git:
              $ref: '#/components/schemas/GitMetadata'
        url:
          type: string
          description: Deep-link to the test run in the TestDino UI
    ErrorEnvelope:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    TestStats:
      type: object
      properties:
        total:
          type: integer
        passed:
          type: integer
        failed:
          type: integer
        skipped:
          type: integer
        flaky:
          type: integer
        timedOut:
          type: integer
        totalAttempts:
          type: integer
        retriedTests:
          type: integer
    GitMetadata:
      type: object
      properties:
        branch:
          type: string
        environment:
          type: string
        commit:
          type: object
          properties:
            hash:
              type: string
            message:
              type: string
            author:
              type: string
  responses:
    Unauthorized:
      description: Missing, invalid, expired, or revoked token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            error:
              code: UNAUTHORIZED
              message: Invalid or unknown user PAT
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: User PAT (td_pat_) scoped to the target project

````