title: Checkin API version: 1.0 date: 2026-10-25 author: Core Team status: Active
Manage isolated workspace databases for files. Allows safe concurrent processing without conflicts.
POST /api/v1/file/:file_uuid/checkinAuth: Required Scope: file-level
Check in a file from its isolated workspace database to the main database. Moves pre-chunks, speaker detections, and vectors from workspace to main tables.
| Parameter | Type | Description |
|---|---|---|
file_uuid |
string | File UUID (32-char hex) |
curl -X POST "$API/api/v1/file/$FILE_UUID/checkin" -H "X-API-Key: $KEY"
{
"file_uuid": "3a6c1865...",
"pre_chunks_moved": 152,
"speaker_detections_moved": 45,
"vectors_moved": 152,
"status": "completed"
}
| Field | Type | Description |
|---|---|---|
file_uuid |
string | File UUID |
pre_chunks_moved |
integer | Number of pre-chunks moved |
speaker_detections_moved |
integer | Number of speaker detections moved |
vectors_moved |
integer | Number of vectors moved |
status |
string | Always "completed" |
| HTTP | When |
|---|---|
401 |
Missing or invalid API key |
500 |
Checkin failed (database error) |
POST /api/v1/file/:file_uuid/checkoutAuth: Required Scope: file-level
Check out a file from the main database. Deletes workspace data for the file.
| Parameter | Type | Description |
|---|---|---|
file_uuid |
string | File UUID (32-char hex) |
curl -X POST "$API/api/v1/file/$FILE_UUID/checkout" -H "X-API-Key: $KEY"
{
"file_uuid": "3a6c1865...",
"rows_deleted": 197,
"status": "checked_out"
}
| Field | Type | Description |
|---|---|---|
file_uuid |
string | File UUID |
rows_deleted |
integer | Total rows deleted from workspace |
status |
string | Always "checked_out" |
GET /api/v1/file/:file_uuid/workspaceAuth: Required Scope: file-level
Check if a workspace database exists for a file.
| Parameter | Type | Description |
|---|---|---|
file_uuid |
string | File UUID (32-char hex) |
curl -s "$API/api/v1/file/$FILE_UUID/workspace" -H "X-API-Key: $KEY"
{
"file_uuid": "3a6c1865...",
"exists": true
}
| Field | Type | Description |
|---|---|---|
file_uuid |
string | File UUID |
exists |
boolean | Whether workspace database exists |
┌─────────────────────────────────────────┐
│ Main Database │
│ (PostgreSQL + Qdrant vectors) │
│ │
│ videos, identities, chunk, ... │
└─────────────────────────────────────────┘
↑ checkin
↓ checkout
┌─────────────────────────────────────────┐
│ Isolated Workspace Database │
│ (SQLite per file) │
│ │
│ pre_chunks, speaker_detections │
│ vectors (Qdrant _workspace collection) │
└─────────────────────────────────────────┘
# After processing completes successfully
curl -X POST "$API/api/v1/file/$FILE_UUID/checkin" -H "X-API-Key: $KEY"
# If processing failed, checkout to clean up
curl -X POST "$API/api/v1/file/$FILE_UUID/checkout" -H "X-API-Key: $KEY"
# Before checkin, verify workspace exists
curl -s "$API/api/v1/file/$FILE_UUID/workspace" -H "X-API-Key: $KEY" | jq '.exists'
1. Register file → status: REGISTERED
2. Start processing → workspace created → status: PROCESSING
3. Processing complete → workspace populated
4. Checkin → move to main DB → status: COMPLETED
5. Workspace deleted automatically
1. Processing failed → workspace contains partial data
2. Checkout → delete workspace → status: COMPLETED
3. Re-trigger processing if needed
{output_dir}/{file_uuid}.workspace.dbqdrant://_workspace_{file_uuid}| Version | Date | Changes |
|---|---|---|
| 1.0 | 2026-10-25 | Initial documentation |