List Ingest Batches
List storage-trigger ingest batches for a workspace, including uploads still waiting to process and batches that failed before a run was created.
Returns ingest batches (files that arrived through Drive, Dropbox, or S3 storage triggers) across every agent in a workspace. Use it to poll for uploads that are stuck waiting on processing or that failed before a run could be created.
Request
bash
curl -X GET "https://api.mosaic.so/automations/ingest-batches?status=failed" \
-H "Authorization: Bearer mk_your_api_key" \
-H "x-workspace-id: [workspace_id]"Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
since | string | No | ISO timestamp lower bound on batch created_at (default: 14 days ago). |
status | string | No | Comma-separated batch statuses (for example open,failed). |
agent_id | string | No | Restrict results to one agent. |
production_id | string | No | Restrict results to one production. |
batch_key | string | No | Restrict results to one batch key. |
limit | number | No | Page size (1-500, default 200). |
offset | number | No | Number of rows to skip for pagination. |
Response
json
{
"ingest_batches": [
{
"id": "6b1f2c3d-0000-4a00-8f00-000000000001",
"provider": "google_drive",
"agent_id": "123e4567-e89b-12d3-a456-789012345678",
"agent_name": "Transcoding Pipeline",
"status": "failed",
"batch_key": "PROD-001",
"production_id": null,
"asset_count": 3,
"retry_count": 11,
"last_error": "drive_path_unresolved_retry_exhausted",
"error_message": "drive_path_unresolved",
"opened_at": "2026-10-13T18:00:00Z",
"last_event_at": "2026-10-13T18:02:00Z",
"scheduled_flush_at": "2026-10-13T18:10:00Z",
"agent_state_id": null,
"created_at": "2026-10-13T18:00:00Z"
}
],
"next_offset": null
}A batch with status: "open" or "flushing" and an old last_event_at is waiting on processing. A failed batch carries the reason in last_error/error_message. Once flushed, agent_state_id links to the run returned by List Automation Runs.