Chicory AI
  • Introduction
    • Introduction to Chicory AI
    • Understanding Chicory
  • Getting Started
    • Quickstart Guide
    • OpenAPI Specification
      • Projects
      • Training
      • Data_sources
      • Messages
      • Chats
      • Health
      • Models
    • Platform - Managed Service
      • How to use?
Powered by GitBook
On this page
  1. Getting Started
  2. OpenAPI Specification

Data_sources

PreviousTrainingNextMessages

List Data Source Types

get

List all available data source types

Responses
200
Successful Response
application/json
get
GET /v1/data-source-types HTTP/1.1
Host: api.chicory.ai
Accept: */*
200

Successful Response

{
  "data_source_types": [
    {
      "id": "text",
      "name": "text",
      "category": "document",
      "required_fields": [
        {
          "name": "text",
          "type": "text",
          "description": "text",
          "optional": false
        }
      ]
    }
  ]
}

List Data Sources

get

List all data sources connected to a project

Path parameters
project_idstringRequired
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/projects/{project_id}/data-sources HTTP/1.1
Host: api.chicory.ai
Accept: */*
{
  "data_sources": [
    {
      "id": "text",
      "project_id": "text",
      "type": "text",
      "name": "text",
      "configuration": {},
      "status": "text",
      "created_at": "2025-05-22T08:48:24.708Z",
      "updated_at": "2025-05-22T08:48:24.708Z"
    }
  ]
}

Validate Data Source

post

Test the connection to a data source

Path parameters
project_idstringRequired
data_source_idstringRequired
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /v1/projects/{project_id}/data-sources/{data_source_id}/validate HTTP/1.1
Host: api.chicory.ai
Accept: */*
{
  "status": "text",
  "message": "text"
}

Delete Data Source

delete

Delete a data source and optionally its associated S3 object

Args: project_id: ID of the project the data source belongs to data_source_id: ID of the data source to delete delete_s3_object: Whether to delete the associated S3 object (default: True) force: Force deletion even if validation fails (default: False)

Path parameters
project_idstringRequired
data_source_idstringRequired
Query parameters
delete_s3_objectbooleanOptionalDefault: true
forcebooleanOptionalDefault: false
Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
delete
DELETE /v1/projects/{project_id}/data-sources/{data_source_id} HTTP/1.1
Host: api.chicory.ai
Accept: */*

No content

  • GETList Data Source Types
  • GETList Data Sources
  • POSTCreate Data Source
  • POSTValidate Data Source
  • PUTUpdate Data Source
  • DELETEDelete Data Source
  • POSTUpload Csv Data Source

Create Data Source

post

Connect a data source to a project

Path parameters
project_idstringRequired
Body

Schema for creating a data source

typestring · enumRequired

Enum for data source types

Possible values:
namestring · min: 1 · max: 100Required
configurationobject · ConfigurationOptional
Responses
201
Successful Response
application/json
422
Validation Error
application/json
post
POST /v1/projects/{project_id}/data-sources HTTP/1.1
Host: api.chicory.ai
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "type": "google_drive",
  "name": "text",
  "configuration": {}
}
{
  "id": "text",
  "project_id": "text",
  "type": "text",
  "name": "text",
  "configuration": {},
  "status": "text",
  "created_at": "2025-05-22T08:48:24.708Z",
  "updated_at": "2025-05-22T08:48:24.708Z"
}

Update Data Source

put

Update an existing data source

Path parameters
project_idstringRequired
data_source_idstringRequired
Body

Schema for updating a data source

namestring · min: 1 · max: 100Optional
configurationobject · ConfigurationOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
put
PUT /v1/projects/{project_id}/data-sources/{data_source_id} HTTP/1.1
Host: api.chicory.ai
Content-Type: application/json
Accept: */*
Content-Length: 34

{
  "name": "text",
  "configuration": {}
}
{
  "id": "text",
  "project_id": "text",
  "type": "text",
  "name": "text",
  "configuration": {},
  "status": "text",
  "created_at": "2025-05-22T08:48:24.708Z",
  "updated_at": "2025-05-22T08:48:24.708Z"
}

Upload Csv Data Source

post

Upload a CSV file as a data source and store it in S3

Path parameters
project_idstringRequired
Body
namestringRequired
descriptionstringOptional
filestring · binaryRequired
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /v1/projects/{project_id}/data-sources/csv-upload HTTP/1.1
Host: api.chicory.ai
Content-Type: multipart/form-data
Accept: */*
Content-Length: 52

{
  "name": "text",
  "description": "text",
  "file": "binary"
}
{
  "id": "text",
  "project_id": "text",
  "type": "text",
  "name": "text",
  "configuration": {},
  "status": "text",
  "created_at": "2025-05-22T08:48:24.708Z",
  "updated_at": "2025-05-22T08:48:24.708Z"
}