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

# List Datasources



## OpenAPI

````yaml /api-v2.json get /datasources
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: Artifact Schemas
    description: Agent artifact schema management
paths:
  /datasources:
    get:
      tags:
        - Datasources
      summary: List Datasources
      operationId: listDatasources
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasourceListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: Python
          label: Python
          source: |-
            from meibel import MeibelClient

            client = MeibelClient(api_key="your-api-key")

            result = client.datasources.list()
            print(result)
        - lang: TypeScript
          label: TypeScript
          source: |-
            import { MeibelClient } from 'meibel';

            const client = new MeibelClient({ apiKey: 'your-api-key' });

            const result = await client.datasources.list();
            console.log(result);
        - lang: Go
          label: Go
          source: |-
            import v2 "github.com/meibel-ai/meibel-go/v2"

            client := v2.NewClient(v2.WithAPIKey("your-api-key"))
            ctx := context.Background()

            result, err := client.Datasources.List(ctx)
            if err != nil {
                log.Fatal(err)
            }
            fmt.Println(result)
components:
  schemas:
    DatasourceListResponse:
      properties:
        datasources:
          items:
            $ref: '#/components/schemas/DatasourceResponse'
          type: array
          title: Datasources
          description: Datasources in the caller's project
      type: object
      required:
        - datasources
      title: DatasourceListResponse
      description: List of datasources visible to the caller.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DatasourceResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique datasource ID
        name:
          type: string
          title: Name
          description: Human-readable datasource name
        description:
          type: string
          title: Description
          description: What this datasource contains
        connector:
          $ref: '#/components/schemas/ConnectorSummary'
          description: >-
            Connection configuration (summary — infra details like buckets,
            roles, and hosts are not echoed back)
        created_at:
          type: string
          title: Created At
          description: ISO 8601 creation timestamp
        updated_at:
          type: string
          title: Updated At
          description: ISO 8601 last-update timestamp
        last_sync_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Sync At
          description: ISO 8601 timestamp of the most recent ingest run
        last_sync_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Sync Status
          description: Status of the most recent ingest run (e.g. 'completed', 'failed')
        total_ingested_files:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Ingested Files
          description: Total number of files ingested across all runs
        metadata_config:
          anyOf:
            - $ref: '#/components/schemas/MetadataConfigResponse'
            - type: 'null'
          description: Current metadata extraction configuration
        files:
          anyOf:
            - $ref: '#/components/schemas/FilesSummaryResponse'
            - type: 'null'
          description: File counts for the datasource
        ingest_counts:
          anyOf:
            - $ref: '#/components/schemas/IngestCountsResponse'
            - type: 'null'
          description: Per-method counts from the latest ingest run
        tables:
          anyOf:
            - items:
                $ref: '#/components/schemas/TableSummaryResponse'
              type: array
            - type: 'null'
          title: Tables
          description: >-
            Tables discovered on a structured datasource — only populated when
            include_tables=true
      type: object
      required:
        - id
        - name
        - description
        - connector
        - created_at
        - updated_at
      title: DatasourceResponse
      description: >-
        A datasource with its latest sync/ingest state and (optionally) table
        details.
    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
    ConnectorSummary:
      properties:
        type:
          type: string
          enum:
            - database
            - cloud_storage
            - web_crawl
          title: Type
          description: Connector type
        cloud_storage:
          anyOf:
            - $ref: '#/components/schemas/CloudStorageConnectorSummary'
            - type: 'null'
        web_crawl:
          anyOf:
            - $ref: '#/components/schemas/WebCrawlConnector'
            - type: 'null'
      type: object
      required:
        - type
      title: ConnectorSummary
      description: >-
        Public-facing connector summary returned on datasource reads. Strips
        infra details that

        customers configured on create and don't need echoed back (bucket names,
        IAM ARNs, regions,

        database hosts, etc.).
    MetadataConfigResponse:
      properties:
        type:
          type: string
          enum:
            - catalog
            - custom
            - default
          title: Type
          description: >-
            'catalog' = using a pre-built model, 'custom' = user-defined fields,
            'default' = no extraction configured
        model_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Id
          description: Catalog model ID — only set when type is 'catalog'
        fields:
          items:
            $ref: '#/components/schemas/MetadataField'
          type: array
          title: Fields
          description: Resolved field definitions in effect. Empty when type is 'default'
      type: object
      required:
        - type
        - fields
      title: MetadataConfigResponse
      description: Current metadata extraction configuration on a datasource.
    FilesSummaryResponse:
      properties:
        total:
          type: integer
          title: Total
          description: Total files currently tracked on the datasource
        deleted:
          anyOf:
            - type: integer
            - type: 'null'
          title: Deleted
          description: Files that have been removed since the last ingest
      type: object
      required:
        - total
      title: FilesSummaryResponse
      description: File-count summary across the datasource's content.
    IngestCountsResponse:
      properties:
        rag:
          anyOf:
            - $ref: '#/components/schemas/IngestMethodCountsResponse'
            - type: 'null'
          description: Counts for the RAG ingest method
        tag:
          anyOf:
            - $ref: '#/components/schemas/IngestMethodCountsResponse'
            - type: 'null'
          description: Counts for the TAG (tables/columns) ingest method
        ref_graph:
          anyOf:
            - $ref: '#/components/schemas/IngestMethodCountsResponse'
            - type: 'null'
          description: Counts for the reference-graph ingest method
      type: object
      title: IngestCountsResponse
      description: File counts broken down by ingest method for the latest run.
    TableSummaryResponse:
      properties:
        name:
          type: string
          title: Name
          description: Table name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Human-authored description of the table
        column_count:
          type: integer
          title: Column Count
          description: Number of columns on the table
      type: object
      required:
        - name
        - column_count
      title: TableSummaryResponse
      description: Summary of a single table discovered on a structured datasource.
    CloudStorageConnectorSummary:
      properties:
        provider:
          type: string
          enum:
            - s3
            - gcs
          title: Provider
          description: Cloud storage provider
      type: object
      required:
        - provider
      title: CloudStorageConnectorSummary
      description: >-
        Public-facing summary of a cloud storage connector. Omits
        bucket/prefix/role/region.
    WebCrawlConnector:
      properties:
        base_url:
          type: string
          title: Base Url
          description: Starting URL for the crawl
        javascript_render:
          type: boolean
          title: Javascript Render
          description: Enable JavaScript rendering
          default: false
        domains:
          anyOf:
            - items:
                $ref: '#/components/schemas/WebDomain'
              type: array
            - type: 'null'
          title: Domains
          description: >-
            Per-domain include/exclude rules. If omitted, the crawler stays on
            the base_url's domain
      type: object
      required:
        - base_url
      title: WebCrawlConnector
      description: Connect to a website for crawling.
    MetadataField:
      properties:
        name:
          type: string
          title: Name
          description: Field name (snake_case)
        type:
          type: string
          enum:
            - string
            - integer
            - float
            - boolean
            - datetime
            - uuid
            - geo
            - list[string]
          title: Type
          description: Data type of the field
        description:
          type: string
          title: Description
          description: What this field captures
        index:
          type: boolean
          title: Index
          description: Whether this field is indexed for filtering
          default: true
      type: object
      required:
        - name
        - type
        - description
      title: MetadataField
      description: A single field extracted from documents during ingest.
    IngestMethodCountsResponse:
      properties:
        total:
          type: integer
          title: Total
          description: Total files processed by this ingest method
        new:
          anyOf:
            - type: integer
            - type: 'null'
          title: New
          description: Files newly added in this run
        updated:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated
          description: Files re-processed because they changed
      type: object
      required:
        - total
      title: IngestMethodCountsResponse
      description: Per-method file counts produced by the latest ingest run.
    WebDomain:
      properties:
        domain:
          type: string
          title: Domain
          description: Domain to crawl (e.g. example.com)
        include_pattern:
          type: string
          title: Include Pattern
          description: Regex URL pattern to include
        exclude_pattern:
          type: string
          title: Exclude Pattern
          description: Regex URL pattern to exclude
          default: ''
      type: object
      required:
        - domain
        - include_pattern
      title: WebDomain
      description: >-
        An allowed domain for a web-crawl datasource, with include/exclude URL
        patterns.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Meibel-API-Key

````