> ## 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.

# Export run test record

> Start building a test record archive for a finished run: a zip with a
README in a regulatory test record layout (EU MDR, IEC 62304, ISO 13485,
ISO/IEC/IEEE 29119-3), every test step and action with screenshots and
recordings, the raw logs, JUnit XML and a manifest with the SHA-256 of every
file. The archive holds no links back to QA.tech.

Returns 202 with the export. When a completed export with the same options
exists for the run's latest results, or one is already being built, that
export is returned instead of starting another. Returns 409 while the run
is still in progress. Poll `get_run_export` until `status` is `completed`,
then download `downloadUrl`.



## OpenAPI

````yaml /api-reference/api.json post /v1/runs/{runShortId}/exports
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: Projects
  - name: Knowledge
  - name: Rules
  - name: Issues
  - name: Automations
paths:
  /v1/runs/{runShortId}/exports:
    post:
      tags:
        - Runs
      summary: Export run test record
      description: >-
        Start building a test record archive for a finished run: a zip with a

        README in a regulatory test record layout (EU MDR, IEC 62304, ISO 13485,

        ISO/IEC/IEEE 29119-3), every test step and action with screenshots and

        recordings, the raw logs, JUnit XML and a manifest with the SHA-256 of
        every

        file. The archive holds no links back to QA.tech.


        Returns 202 with the export. When a completed export with the same
        options

        exists for the run's latest results, or one is already being built, that

        export is returned instead of starting another. Returns 409 while the
        run

        is still in progress. Poll `get_run_export` until `status` is
        `completed`,

        then download `downloadUrl`.
      operationId: ExportRun
      parameters:
        - name: runShortId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunExportRequest'
      responses:
        '202':
          description: >-
            The request has been accepted for processing, but processing has not
            yet completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunExport'
components:
  schemas:
    RunExportRequest:
      type: object
      properties:
        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.
        includeVideos:
          type: boolean
          description: >-
            Include session recordings in the archive. Defaults to true.
            Recordings make the archive much larger.
      description: Request body for exporting a run's test record.
    RunExport:
      type: object
      required:
        - id
        - runShortId
        - status
        - includeVideos
        - sizeBytes
        - sha256
        - fileCount
        - error
        - createdAt
        - completedAt
        - downloadUrl
        - downloadUrlExpiresAt
      properties:
        id:
          type: string
          description: Export ID. Pass it to `get_run_export` to poll.
        runShortId:
          type: string
          description: Short ID of the exported run.
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
          description: >-
            `pending` and `running` while the archive is built; then `completed`
            or `failed`.
        includeVideos:
          type: boolean
          description: Whether session recordings are included.
        sizeBytes:
          type: integer
          format: int64
          nullable: true
          description: Size of the zip in bytes, once completed.
        sha256:
          type: string
          nullable: true
          description: >-
            SHA-256 of the zip (hex), once completed. Verify the download
            against it.
        fileCount:
          type: integer
          format: int32
          nullable: true
          description: Number of files in the zip, once completed.
        error:
          type: string
          nullable: true
          description: Why the export failed, when `status` is `failed`.
        createdAt:
          type: string
          description: When the export was requested (ISO 8601).
        completedAt:
          type: string
          nullable: true
          description: When the export finished (ISO 8601).
        downloadUrl:
          type: string
          nullable: true
          description: >-
            Signed URL for the zip, valid for one hour. Minted on every request
            once completed; null otherwise.
        downloadUrlExpiresAt:
          type: string
          nullable: true
          description: When `downloadUrl` stops working (ISO 8601).
      description: >-
        A test record export of a run: one zip with a README in a regulatory
        test

        record layout, every test step and recorded action with screenshots and

        recordings, the raw logs and a manifest with the SHA-256 of every file.
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.