Skip to main content
The ingestion API is a lightweight way to index documents. If you need more control, consider creating a Connector in the Admin Panel or following the Create a Connector API guide.

When to use the Ingestion API?

Use the Ingestion API for:
  • Unsupported sources: Add content from systems that don’t have built-in Connectors
  • Supplemental data: Add extra context to existing Connector data (like README files for GitLab)
  • Editing documents: Modify documents in Gorbit when the Admin cannot update the original document in the source
  • Programmatic workflows: Integrate document indexing into your existing data pipelines

Guide

Skip to the Full Code section if you don’t want the step-by-step guide. In this example, we’ll index local files with the Ingestion API.
The Ingestion API base URL is https://cloud.gorbit.app/api/gorbit-api/ingestion or your own domain.
1

Prepare your Connector

Since we want these files to appear in the Connectors page, we’ll need to first create a Connector. For this example, we’ll create a File Connector with a dummy text file.If you already have a Connector you would like to associate your Ingestion files with, click on the Connector and copy the cc_pair_id from the URL.https://cloud.gorbit.app/admin/connector/308 -> cc_pair_id is 243
2

Prepare your request

3

Process your documents into the proper JSON object

If you want your documents to show up in the Connectors page, you must specify a cc_pair_id in the payload!
See Core Concepts: Documents for details on the IngestionDocument object.
JSON
4

Make the request to the /ingestion endpoint

The API will return a success response if the document is accepted for processing. The actual indexing happens asynchronously.

Full Code

Python

Extra Example

This script crawls a specified directory for JSON files and sends the contents to the Ingestion API.
Python