For the complete documentation index, see llms.txt. This page is also available as Markdown.

Project data and Batch Queues API

List Data Units, upload files, attach governed sources, and monitor ingestion.

Outcome: List Data Units, upload files, attach governed sources, and monitor ingestion.

Data Unit and Batch Queue endpoints

Method
Endpoint
Purpose

GET

/api/sdk/projects/{project_id}/data-units/

List loose datasource and grouped work units

GET

/api/sdk/projects/{project_id}/data-units/{unit_id}/

Retrieve one Data Unit

GET

/api/sdk/projects/{project_id}/upload-info/

Read accepted formats and size limits

POST

/api/sdk/projects/{project_id}/upload-data/

Upload one multipart file

POST

/api/sdk/projects/{project_id}/medical-upload-sessions/{session_id}/finalize/

Finalize medical uploads

GET

/api/sdk/projects/{project_id}/upload-sessions/

List Batch Queues

GET

/api/sdk/projects/{project_id}/upload-sessions/{queue_id}/

Read one queue

GET

/api/sdk/projects/{project_id}/upload-sessions/{queue_id}/status/

Read processing counts

GET

/api/sdk/projects/{project_id}/upload-sessions/{queue_id}/data/

Inspect normalized item results

Data Unit filters are search, data_type, status, batch_queue, and kind.

curl --fail-with-body --silent --show-error \
  "$UNITLAB_API_URL/api/sdk/projects/PROJECT_ID/data-units/?data_type=image&status=annotate&kind=group" \
  -H "Authorization: Api-Key $UNITLAB_API_KEY"

Upload one file

Read upload-info first. Generate one UUID as session_id and reuse it for every file in the same batch.

SESSION_ID="YOUR_UUID"
curl --fail-with-body --silent --show-error \
  -X POST "$UNITLAB_API_URL/api/sdk/projects/PROJECT_ID/upload-data/" \
  -H "Authorization: Api-Key $UNITLAB_API_KEY" \
  -F "session_id=$SESSION_ID" \
  -F "fps=2.0" \
  -F "file=@./clip.mp4"

The response must include datasource_id. Video uploads accept fps. Finalize a medical session after all medical files transfer successfully.

Attach governed workspace data

Method
Endpoint
Purpose

POST

/api/sdk/projects/{project_id}/attach-data/preview/

Validate selection without mutation

POST

/api/sdk/projects/{project_id}/attach-data/commit/

Attach reviewed folders or Dataset versions

GET

/api/sdk/projects/{project_id}/attached-sources/

List source links

GET

/api/sdk/projects/{project_id}/attached-sources/{source_id}/detach-preview/

Preview detach impact

POST

/api/sdk/projects/{project_id}/attached-sources/{source_id}/detach/

Detach one source link

Commit the same body only after preview resolves the intended asset count. If commit returns a queue ID, poll until processing is zero, then inspect failed and queue data.

Request operating contract

Concern
Required behavior

Execution surface

TLS-verified client using the reviewed current public /api/sdk/... route contract.

Identity

Least-privilege workspace service identity; secrets remain outside code and logs.

Request boundary

URL-encoded stable IDs, explicit deadlines, structured errors, and complete pagination.

Success evidence

Response identifiers, read-after-write verification, and separate processing status for Batch Queues.


Related Unitlab capability guides: multimodal data curation