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

# Export test cases as CSV

> Generate a CSV from the current DB state of the given test cases, upload to storage, and return a presigned download URL. See [Tests](https://docs.galtea.ai/concepts/product/test).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /testCases/export
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /testCases/export:
    post:
      tags:
        - test-cases
      summary: Export test cases as CSV
      description: >-
        Generate a CSV from the current DB state of the given test cases, upload
        to storage, and return a presigned download URL. See
        [Tests](https://docs.galtea.ai/concepts/product/test).
      operationId: exportTestCasesCsv
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                testCaseIds:
                  type: array
                  example:
                    - tc_123
                    - tc_456
                  items:
                    type: string
                  description: >-
                    Array of test case IDs to export. Provide either
                    `testCaseIds` or `testIds`.
                testIds:
                  type: array
                  example:
                    - test_123
                    - test_456
                  items:
                    type: string
                  description: >-
                    Array of test IDs for which to export test cases. Provide
                    either `testCaseIds` or `testIds`.
      responses:
        '200':
          description: CSV exported successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  downloadUrl:
                    type: string
                    description: Presigned URL to download the CSV file
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````