|
103 | 103 | "insertLocked": false, |
104 | 104 | "updateLocked": false, |
105 | 105 | "deleteLocked": false |
106 | | - } |
| 106 | + }, |
| 107 | + "job": null |
107 | 108 | } |
108 | 109 | ], |
109 | 110 | "nextCursor": null |
|
211 | 212 | "insertLocked": false, |
212 | 213 | "updateLocked": false, |
213 | 214 | "deleteLocked": false |
214 | | - } |
| 215 | + }, |
| 216 | + "job": null |
215 | 217 | } |
216 | 218 | } |
217 | 219 | } |
|
467 | 469 | "deleteLocked": true |
468 | 470 | }, |
469 | 471 | "createdAt": "2026-01-15T10:30:00.000Z", |
470 | | - "updatedAt": "2026-01-16T09:12:00.000Z" |
| 472 | + "updatedAt": "2026-01-16T09:12:00.000Z", |
| 473 | + "job": null |
471 | 474 | } |
472 | 475 | } |
473 | 476 | } |
|
1720 | 1723 | "deleteLocked": true |
1721 | 1724 | }, |
1722 | 1725 | "createdAt": "2026-01-15T10:30:00.000Z", |
1723 | | - "updatedAt": "2026-01-16T09:12:00.000Z" |
| 1726 | + "updatedAt": "2026-01-16T09:12:00.000Z", |
| 1727 | + "job": null |
1724 | 1728 | } |
1725 | 1729 | } |
1726 | 1730 | } |
|
2916 | 2920 | "post": { |
2917 | 2921 | "operationId": "importTableCsvAsync", |
2918 | 2922 | "summary": "Import CSV (Background)", |
2919 | | - "description": "Start a background import of a file already uploaded to workspace storage \u2014 the path for files too large for the synchronous import.\n\nReturns as soon as the job is queued. Track it with `GET /api/v2/tables/jobs` and stop it with `POST /job/cancel`. `fileKey` must sit under this workspace\u2019s storage prefix. The table\u2019s lock flags are checked before the job slot is claimed, so a locked table answers 423 here rather than failing inside the worker.", |
| 2923 | + "description": "Start a background import of a file already uploaded to workspace storage \u2014 the path for files too large for the synchronous import.\n\nReturns as soon as the job is queued. Track it on the table itself \u2014 `GET /api/v2/tables/{tableId}` returns a `job` object with `status`, `rowsProcessed` and `error` while the import runs \u2014 and stop it with `POST /job/cancel`. (`GET /api/v2/tables/jobs` lists exports only: those run concurrently and are not derived onto the table.) `fileKey` must sit under this workspace\u2019s storage prefix. The table\u2019s lock flags are checked before the job slot is claimed, so a locked table answers 423 here rather than failing inside the worker.", |
2920 | 2924 | "tags": ["Tables"], |
2921 | 2925 | "x-codeSamples": [ |
2922 | 2926 | { |
|
3711 | 3715 | "folderId", |
3712 | 3716 | "locks", |
3713 | 3717 | "createdAt", |
3714 | | - "updatedAt" |
| 3718 | + "updatedAt", |
| 3719 | + "job" |
3715 | 3720 | ], |
3716 | 3721 | "properties": { |
3717 | 3722 | "id": { |
|
3767 | 3772 | }, |
3768 | 3773 | "locks": { |
3769 | 3774 | "$ref": "#/components/schemas/TableLocks" |
| 3775 | + }, |
| 3776 | + "job": { |
| 3777 | + "oneOf": [ |
| 3778 | + { |
| 3779 | + "$ref": "#/components/schemas/TableJobState" |
| 3780 | + }, |
| 3781 | + { |
| 3782 | + "type": "null" |
| 3783 | + } |
| 3784 | + ], |
| 3785 | + "description": "In-flight background job, or null when the table is idle." |
3770 | 3786 | } |
3771 | 3787 | } |
3772 | 3788 | }, |
|
5422 | 5438 | } |
5423 | 5439 | } |
5424 | 5440 | } |
| 5441 | + }, |
| 5442 | + "TableJobState": { |
| 5443 | + "type": "object", |
| 5444 | + "description": "The table's in-flight background job. Import and delete jobs are derived onto the table itself (one write job per table), so the table is their status endpoint \u2014 poll `GET /api/v2/tables/{tableId}` after starting one. Exports are read-only and run concurrently, so they are listed separately by `GET /api/v2/tables/jobs` instead.", |
| 5445 | + "required": ["id", "type", "status", "rowsProcessed", "error"], |
| 5446 | + "properties": { |
| 5447 | + "id": { |
| 5448 | + "type": ["string", "null"], |
| 5449 | + "description": "Job id \u2014 pass to `POST /job/cancel` to stop it." |
| 5450 | + }, |
| 5451 | + "type": { |
| 5452 | + "enum": ["import", "delete", "export", "backfill", "update", null], |
| 5453 | + "description": "Which kind of job is running." |
| 5454 | + }, |
| 5455 | + "status": { |
| 5456 | + "enum": ["running", "ready", "failed", "canceled"], |
| 5457 | + "description": "`running` is in-flight; the rest are terminal." |
| 5458 | + }, |
| 5459 | + "rowsProcessed": { |
| 5460 | + "type": "integer", |
| 5461 | + "description": "Rows handled so far \u2014 progress for a running job." |
| 5462 | + }, |
| 5463 | + "error": { |
| 5464 | + "type": ["string", "null"], |
| 5465 | + "description": "Failure reason for a `failed` job; null otherwise." |
| 5466 | + } |
| 5467 | + } |
5425 | 5468 | } |
5426 | 5469 | }, |
5427 | 5470 | "responses": { |
|
0 commit comments