> ## 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 run test case trace

> Returns the agent's step-by-step action trace for a run test case: per step the reasoning, the tools it called with their arguments, the observed result, and a screenshot. Paginated via `limit`/`offset` so large traces don't overflow token limits.



## OpenAPI

````yaml /api-reference/api.json get /v1/run-test-case/{shortId}/trace
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}/trace:
    get:
      tags:
        - Runs
      summary: Get run test case trace
      description: >-
        Returns the agent's step-by-step action trace for a run test case: per
        step the reasoning, the tools it called with their arguments, the
        observed result, and a screenshot. Paginated via `limit`/`offset` so
        large traces don't overflow token limits.
      operationId: GetRunTestCaseTrace
      parameters:
        - name: shortId
          in: path
          required: true
          schema:
            type: string
        - name: query
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/GetRunTestCaseTraceQuery'
          explode: false
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRunTestCaseTraceResponse'
components:
  schemas:
    GetRunTestCaseTraceQuery:
      type: object
      properties:
        limit:
          type: integer
          format: int32
          minimum: 1
          maximum: 200
          description: Maximum number of steps to return (1-200). Defaults to 50.
          default: 50
        offset:
          type: integer
          format: int32
          minimum: 0
          description: Number of steps to skip for pagination. Defaults to 0.
        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.
    GetRunTestCaseTraceResponse:
      type: object
      required:
        - runTestCaseShortId
        - total
        - limit
        - offset
        - steps
      properties:
        runTestCaseShortId:
          type: string
        total:
          type: integer
          format: int32
          description: Total number of steps available across the whole trace.
        limit:
          type: integer
          format: int32
        offset:
          type: integer
          format: int32
        steps:
          type: array
          items:
            $ref: '#/components/schemas/RunTestCaseStep'
      description: >-
        Agent step trace for a run test case, paginated so large traces don't
        overflow.
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    RunTestCaseStep:
      type: object
      required:
        - index
        - startedAt
        - endedAt
        - durationMs
        - reasoning
        - toolCalls
        - toolResult
        - screenshotUrl
      properties:
        index:
          type: integer
          format: int32
          description: 1-based position of the step within the full trace.
        startedAt:
          type: string
          nullable: true
        endedAt:
          type: string
          nullable: true
        durationMs:
          type: integer
          format: int32
          nullable: true
        reasoning:
          type: string
          nullable: true
          description: The agent's reasoning for this step.
        toolCalls:
          type: array
          items:
            $ref: '#/components/schemas/RunTestCaseToolCall'
        toolResult:
          type: string
          nullable: true
          description: >-
            The tool result observed after the action. Truncated for large
            outputs.
        screenshotUrl:
          type: string
          nullable: true
          description: >-
            Screenshot captured around this step, if any. May be a time-limited
            URL.
      description: One reason→act step in the agent's trace.
    RunTestCaseToolCall:
      type: object
      required:
        - name
        - arguments
      properties:
        name:
          type: string
          description: Tool name, e.g. `click`, `type`, `navigate`, `evaluate`.
        arguments:
          type: object
          additionalProperties: {}
          description: Arguments the agent passed to the tool.
      description: A single tool the agent invoked within a step.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````