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

# Process Download (sync)



## OpenAPI

````yaml /api-v2.json post /datasources/{datasource_id}/downloads/process
openapi: 3.1.0
info:
  title: Meibel AI API
  summary: Meibel Gateway Service
  description: >-
    Our API allows you to interact with our services. Read the
    [docs](https://docs.meibel.ai) to learn how to use it.
  version: 0.6.4
servers:
  - url: https://api.meibel.ai/v2
    description: Meibel API (v2)
  - url: https://api.dev.meibel.ai/v2
    description: Meibel Dev API (v2)
  - url: http://localhost:8000/v2
    description: Local Development
security: []
tags:
  - name: Datasources
    description: v2 datasource management
  - name: Data Elements
    description: v2 data element CRUD and search
  - name: File Upload
    description: Upload files to a datasource and track upload progress
  - name: Ingest
    description: Trigger and monitor datasource ingestion
  - name: Datasource Downloads
    description: Export all datasource content as a zip archive
  - name: Table Descriptions
    description: v2 table and column descriptions
  - name: Metadata Model Catalog
    description: v2 metadata model catalog
  - name: Confidence Scoring
    description: v2 confidence scoring jobs and summaries
  - name: Documents
    description: Parse and transform documents into structured data
  - name: Agents
    description: Agent definition management
  - name: Sessions
    description: Agent session (execution) management and chat
  - name: Execution Policies
    description: Data access and tool usage constraints scoped to agent sessions
  - name: Artifact Schemas
    description: Agent artifact schema management
paths:
  /datasources/{datasource_id}/downloads/process:
    post:
      tags:
        - Datasource Downloads
      summary: Process Download (sync)
      operationId: processDownload
      parameters:
        - name: datasource_id
          in: path
          required: true
          schema:
            type: string
            title: Datasource Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/DownloadJobRequest'
                - type: 'null'
              title: Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: Python
          label: Python
          source: |-
            import os
            from meibel import MeibelClient
            from meibel.models import DownloadJobRequest

            client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])

            result = client.datasources.downloads.process(
                "ds_8f3a1c2b9e4d",
                DownloadJobRequest(
                    content="files_and_parsed_content",
                    data_element_ids=["elem_a1b2c3", "elem_d4e5f6"],
                ),
            )

            print(result)
        - lang: TypeScript
          label: TypeScript
          source: >-
            import { MeibelClient } from "meibel";


            const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY
            });


            const result = await client.datasources.downloads.process(
              "ds_8f3a1c2b9e4d",
              {
                content: "files_and_parsed_content",
                data_element_ids: ["elem_492b1a", "elem_7d3c9f"],
              }
            );


            console.log(result);
        - lang: Go
          label: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\tv2 \"github.com/meibel-ai/meibel-go/v2\"\n)\n\nfunc main() {\n\tclient := v2.NewClient(v2.WithAPIKey(os.Getenv(\"MEIBEL_API_KEY\")))\n\n\tresult, err := client.Datasources.Downloads.Process(\n\t\tcontext.Background(),\n\t\t\"ds_8f3a2b1c\",\n\t\t&v2.DownloadJobRequest{\n\t\t\tContent:        v2.String(\"files_and_parsed_content\"),\n\t\t\tDataElementIds: []string{\"elem_1a2b3c\", \"elem_4d5e6f\"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(result)\n}"
components:
  schemas:
    DownloadJobRequest:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: >-
            Content to include: files, parsed_content, or
            files_and_parsed_content
        data_element_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Data Element Ids
          description: Specific data element IDs to include
      type: object
      title: DownloadJobRequest
      description: >-
        Body for creating a download job. Omit both fields to download all
        files.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Meibel-API-Key

````