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

# Get Ingest Status



## OpenAPI

````yaml /api-v2.json get /datasources/{datasource_id}/ingest-status
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}/ingest-status:
    get:
      tags:
        - Ingest
      summary: Get Ingest Status
      operationId: getIngestStatus
      parameters:
        - name: datasource_id
          in: path
          required: true
          schema:
            type: string
            title: Datasource Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestStatusResponse'
        '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


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


            status =
            client.datasources.ingest.get_status(datasource_id="ds_8f3a2b1c")


            print(f"Status: {status.status}, started at: {status.started_at}")


            for method in status.methods:
                print(f"{method.method}: {method.processed_files}/{method.total_files} processed, {method.errors} errors")
        - lang: TypeScript
          label: TypeScript
          source: >-
            import { MeibelClient } from "meibel";


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


            const status = await
            client.datasources.ingest.getStatus("ds_8f3a1c2b9d4e");


            console.log(`Status: ${status.status}, started at:
            ${status.started_at}`);


            for (const method of status.methods) {
              console.log(
                `${method.method}: ${method.processed_files}/${method.total_files} processed, ${method.errors} errors`
              );
            }
        - 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\tstatus, err := client.Datasources.Ingest.GetStatus(context.Background(), \"ds_8f3a2b1c\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"Status: %s\\n\", status.Status)\n\tfor _, m := range status.Methods {\n\t\tfmt.Printf(\"Method %s: %d/%d files processed\\n\", m.Method, m.ProcessedFiles, m.TotalFiles)\n\t}\n}"
components:
  schemas:
    IngestStatusResponse:
      properties:
        datasource_id:
          type: string
          title: Datasource Id
          description: ID of the datasource
        status:
          $ref: '#/components/schemas/IngestStatus'
          description: Overall run status
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
          description: ISO 8601 timestamp when this run started
        completed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Completed At
          description: ISO 8601 timestamp when this run finished — null while still running
        methods:
          items:
            $ref: '#/components/schemas/IngestMethodSummary'
          type: array
          title: Methods
          description: Per-method progress and counts for this run
          default: []
      type: object
      required:
        - datasource_id
        - status
      title: IngestStatusResponse
      description: Status of the most recent ingest run for a datasource.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IngestStatus:
      type: string
      enum:
        - not_started
        - running
        - completed
        - failed
        - canceled
        - terminated
        - timed_out
        - unknown
      title: IngestStatus
      description: Lifecycle state of an ingest run.
    IngestMethodSummary:
      properties:
        method:
          type: string
          title: Method
          description: Ingest method name (e.g. 'rag', 'tag', 'ref_graph')
        total_files:
          type: integer
          title: Total Files
          description: Total files this method intends to process
          default: 0
        processed_files:
          type: integer
          title: Processed Files
          description: Files this method has finished processing
          default: 0
        adds:
          type: integer
          title: Adds
          description: Files added in this run
          default: 0
        updates:
          type: integer
          title: Updates
          description: Files re-processed because they changed
          default: 0
        errors:
          type: integer
          title: Errors
          description: Files that errored during processing
          default: 0
        warnings:
          type: integer
          title: Warnings
          description: Files that produced warnings during processing
          default: 0
      type: object
      required:
        - method
      title: IngestMethodSummary
      description: Per-method aggregate counts for the current ingest run.
    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

````