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

# Get a test run

> Retrieve detailed information about a specific test run, including step-by-step execution results, failure analysis, and AI-generated fix suggestions.



## OpenAPI

````yaml GET /api/v1/test-runs/{runId}
openapi: 3.0.3
info:
  title: Decipher API
  version: 1.0.0
  description: >-
    API for retrieving test run data from Decipher. Use your API key to
    authenticate requests.
servers:
  - url: https://api.getdecipher.com
    description: Production
security: []
paths:
  /api/v1/test-runs/{runId}:
    get:
      summary: Get a test run
      description: >-
        Retrieve detailed information about a specific test run, including
        step-by-step execution results, failure analysis, and AI-generated fix
        suggestions.
      parameters:
        - schema:
            type: string
            description: The ID of the test run
            example: '12345'
          required: true
          description: The ID of the test run
          name: runId
          in: path
        - schema:
            type: string
            enum:
              - screenshots
            description: Pass "screenshots" to inline signed screenshot URLs into each step
          required: false
          description: Pass "screenshots" to inline signed screenshot URLs into each step
          name: include
          in: query
      responses:
        '200':
          description: Test run details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestRunResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Test run not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    TestRunResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - testRun
        id:
          type: number
        testId:
          type: number
        testName:
          type: string
        testUrl:
          type: string
          description: Decipher dashboard link for the test
          example: https://app.getdecipher.com/tests/456
        runUrl:
          type: string
          description: Decipher dashboard link for this run
          example: https://app.getdecipher.com/tests/456/runs/789
        status:
          type: string
          enum:
            - passed
            - failed
            - running
        startTime:
          type: string
          nullable: true
        endTime:
          type: string
          nullable: true
        durationMs:
          type: number
          nullable: true
        triggeredBy:
          type: string
          nullable: true
        createdAt:
          type: string
        summary:
          $ref: '#/components/schemas/TestRunSummary'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/TestRunStep'
        globalErrors:
          type: array
          items:
            $ref: '#/components/schemas/GlobalError'
        suggestedFixes:
          type: array
          items:
            $ref: '#/components/schemas/SuggestedFix'
        screenshotsExpiresAt:
          type: string
          description: >-
            ISO timestamp when screenshot URLs expire (~3h). Only present when
            ?include=screenshots is set.
      required:
        - object
        - id
        - testId
        - testName
        - testUrl
        - runUrl
        - status
        - startTime
        - endTime
        - durationMs
        - triggeredBy
        - createdAt
        - summary
        - steps
        - globalErrors
        - suggestedFixes
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - authorization_error
                - not_found_error
                - validation_error
                - rate_limit_error
                - api_error
            code:
              type: string
            message:
              type: string
            field:
              type: string
          required:
            - type
            - code
            - message
      required:
        - error
    TestRunSummary:
      type: object
      nullable: true
      properties:
        oneLineSummary:
          type: string
          nullable: true
        overallReasoning:
          type: string
          nullable: true
        firstFailedStepNumber:
          type: number
          nullable: true
      required:
        - oneLineSummary
        - overallReasoning
        - firstFailedStepNumber
    TestRunStep:
      type: object
      properties:
        stepNumber:
          type: number
          example: 1
        description:
          type: string
          example: Navigate to login page
        actionType:
          type: string
          example: navigate
        success:
          type: boolean
        durationMs:
          type: number
          example: 1200
        failure:
          $ref: '#/components/schemas/StepFailureDetail'
        hasScreenshots:
          type: boolean
        screenshots:
          type: object
          properties:
            before:
              type: string
              nullable: true
            after:
              type: string
              nullable: true
          required:
            - before
            - after
          description: Screenshot URLs. Only present when ?include=screenshots is set.
      required:
        - stepNumber
        - description
        - actionType
        - success
        - durationMs
        - failure
        - hasScreenshots
    GlobalError:
      type: object
      properties:
        stepNumber:
          type: number
        stepDescription:
          type: string
        screenshotType:
          type: string
          enum:
            - before
            - after
        errorText:
          type: string
        errorLocation:
          type: string
        isBugIssue:
          type: boolean
      required:
        - stepNumber
        - stepDescription
        - screenshotType
        - errorText
        - errorLocation
        - isBugIssue
    SuggestedFix:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        affectedStepNumbers:
          type: array
          items:
            type: number
        confidence:
          type: string
          enum:
            - high
            - medium
            - low
      required:
        - title
        - description
        - affectedStepNumbers
        - confidence
    StepFailureDetail:
      type: object
      nullable: true
      properties:
        type:
          type: string
          nullable: true
          example: element_not_found
        source:
          type: string
          nullable: true
          example: execution
        description:
          type: string
        reasoning:
          type: string
          nullable: true
        expectedOutcome:
          type: string
          nullable: true
        actualOutcome:
          type: string
          nullable: true
      required:
        - type
        - source
        - description
        - reasoning
        - expectedOutcome
        - actualOutcome
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Use your Decipher API key as the bearer token.

````