llamaindex Data Sources API

Manage data sources at the project level.

OpenAPI Specification

llamaindex-data-sources-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: LlamaIndex LlamaCloud Data Sources API
  description: The LlamaCloud API is the central REST API for LlamaIndex's cloud platform, providing programmatic access to managed document processing, indexing, and retrieval services. It enables developers to build production-grade LLM applications by leveraging cloud-hosted infrastructure for document ingestion, knowledge management, and agent orchestration. The API supports authentication via API keys and is available in both US and EU regions.
  version: '1.0'
  contact:
    name: LlamaIndex Support
    url: https://www.llamaindex.ai/contact
  termsOfService: https://www.llamaindex.ai/terms-of-service
servers:
- url: https://api.cloud.llamaindex.ai/api/v1
  description: US Production Server
- url: https://api.cloud.llamaindex.eu/api/v1
  description: EU Production Server
security:
- bearerAuth: []
tags:
- name: Data Sources
  description: Manage data sources at the project level.
paths:
  /data-sources:
    get:
      operationId: listDataSources
      summary: List data sources
      description: Retrieve a list of all data sources for the specified project.
      tags:
      - Data Sources
      parameters:
      - name: project_id
        in: query
        description: Filter data sources by project identifier.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved list of data sources
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DataSource'
        '401':
          description: Unauthorized - invalid or missing API key
    post:
      operationId: createDataSource
      summary: Create a data source
      description: Create a new data source that can be connected to one or more pipelines for automatic document ingestion.
      tags:
      - Data Sources
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataSourceInput'
      responses:
        '201':
          description: Data source created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSource'
        '400':
          description: Bad request - invalid data source configuration
        '401':
          description: Unauthorized - invalid or missing API key
components:
  schemas:
    DataSourceInput:
      type: object
      description: Input for creating or connecting a data source.
      required:
      - name
      - source_type
      properties:
        name:
          type: string
          description: Human-readable name for the data source.
        source_type:
          type: string
          description: Type of the data source.
        project_id:
          type: string
          description: Identifier of the project to associate the data source with.
        config:
          type: object
          additionalProperties: true
          description: Configuration specific to the data source type.
    DataSource:
      type: object
      description: A data source connected to a pipeline for automatic document ingestion.
      properties:
        id:
          type: string
          description: Unique identifier of the data source.
        name:
          type: string
          description: Human-readable name of the data source.
        source_type:
          type: string
          description: Type of the data source.
        project_id:
          type: string
          description: Identifier of the project the data source belongs to.
        config:
          type: object
          additionalProperties: true
          description: Configuration specific to the data source type.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the data source was created.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: LlamaCloud API key obtained from the LlamaCloud dashboard. Include as a Bearer token in the Authorization header.
externalDocs:
  description: LlamaCloud API Documentation
  url: https://developers.api.llamaindex.ai/