> ## 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 test case history

> Returns the recent pass/fail history and durations for the test case behind a run test case short ID, across its most recent runs — for flaky-vs-consistent analysis.



## OpenAPI

````yaml /api-reference/api.json get /v1/run-test-case/{shortId}/history
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: Release Checks
  - name: Projects
paths:
  /v1/run-test-case/{shortId}/history:
    get:
      tags:
        - Runs
      summary: Get test case history
      description: >-
        Returns the recent pass/fail history and durations for the test case
        behind a run test case short ID, across its most recent runs — for
        flaky-vs-consistent analysis.
      operationId: GetTestCaseHistory
      parameters:
        - name: shortId
          in: path
          required: true
          schema:
            type: string
        - name: query
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/GetTestCaseHistoryQuery'
          explode: false
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTestCaseHistoryResponse'
components:
  schemas:
    GetTestCaseHistoryQuery:
      type: object
      properties:
        limit:
          type: integer
          format: int32
          minimum: 1
          maximum: 50
          description: Maximum number of past executions to return (1-50). Defaults to 20.
          default: 20
        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.
    GetTestCaseHistoryResponse:
      type: object
      required:
        - projectTestCaseId
        - name
        - total
        - limit
        - history
      properties:
        projectTestCaseId:
          type: string
          description: Stable project test case ID these executions belong to.
        name:
          type: string
        total:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
        history:
          type: array
          items:
            $ref: '#/components/schemas/TestCaseHistoryItem'
      description: >-
        Recent pass/fail history for a single test case across its most recent
        runs.
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    TestCaseHistoryItem:
      type: object
      required:
        - runTestCaseShortId
        - runShortId
        - status
        - result
        - errorCode
        - startedAt
        - completedAt
        - durationMs
        - url
      properties:
        runTestCaseShortId:
          type: string
        runShortId:
          type: string
        status:
          type: string
          description: >-
            Run lifecycle status: `INITIATED`, `RUNNING`, `COMPLETED`, `ERROR`,
            or `CANCELLED`.
        result:
          type: string
          nullable: true
          description: >-
            Outcome: `PASSED`, `FAILED`, or `SKIPPED`. `null` while still
            running.
        errorCode:
          type: string
          nullable: true
          description: Error classification, when present.
        startedAt:
          type: string
          nullable: true
        completedAt:
          type: string
          nullable: true
        durationMs:
          type: integer
          format: int32
          nullable: true
          description: >-
            Wall-clock duration in milliseconds, when both timestamps are
            present.
        url:
          type: string
          description: Deep link to this execution's recording and trace in the QA.tech UI.
      description: One past execution of a test case, for flaky-vs-consistent analysis.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````