Indexing
These endpoints add documents to a docset and let you automate ingestion pipelines. A docset is indexed from a source — S3 (default), SharePoint, or Google Drive.
Index a docset
POST /index
| Field | Type | Required | Description |
|---|---|---|---|
docSetName | string | ✅ | The docset to index into. |
sourceType | enum | S3 (default), SHAREPOINT, or GOOGLEDRIVE. | |
credentials | object | Source credentials; shape depends on sourceType. Omit for S3 when the API is configured with bucket access. | |
indexOptions | object | { targetIndexTypes?, forceReindex? }. | |
async | boolean | Queue the job (true, default) or block until done (false). | |
accountName | string | Optional account/tenant label. | |
summaryModel | string | LLM used for document summarization. |
curl -X POST "$API_URL/index" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "docSetName": "company-policies", "sourceType": "S3" }'By default indexing runs asynchronously and returns a job id; poll
/index/progress to follow it:
{ "message": "Indexing queued", "docSetName": "company-policies", "jobId": "..." }For non-S3 sources, the API probes the source synchronously before accepting
the request and returns 422 if it can’t connect or finds 0 files while
documents already exist. Check the source first
to surface credential problems early.
Check a source before indexing
POST /index/check-source
Validates connectivity and reports how many supported files the source has, without indexing anything.
curl -X POST "$API_URL/index/check-source" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "docSetName": "company-policies", "sourceType": "S3" }'{ "sourceFileCount": 12, "existingDocumentCount": 0, "message": "Found 12 supported files." }Track progress
GET /index/progress/{docSetName}
Returns document status counts and an isIndexing flag. For SharePoint, you can
scope progress to a folder by passing siteId, driveId, and folderPath
together.
curl "$API_URL/index/progress/company-policies" \
-H "Authorization: Bearer $API_TOKEN"{
"pendingCount": 3,
"indexingCount": 1,
"completedCount": 8,
"errorCount": 0,
"isIndexing": true
}Other indexing operations
| Operation | Endpoint |
|---|---|
| Cancel an in-progress run | POST /index/cancel/{docSetName} |
| Retry a single failed document | POST /index/retry/{documentId} |
| Delete docsets | DELETE /index/docsets (body: { "docSetNames": [...] }) |
See the API Reference for full request and response shapes.