Commit Fan Out
const url = 'https://example.com/api/ingest/commit-fan-out/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"layers":[{"layer_name":"example","title":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/ingest/commit-fan-out/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "layers": [ { "layer_name": "example", "title": "example" } ] }'Convert a single pending IngestJob into N independent per-layer ingest tasks.
For multi-layer sources (e.g. GeoPackage with 2+ layers), this endpoint fans out the original upload into one Procrastinate task per requested layer, each becoming a separate dataset. The original job is marked ‘fanned_out’ (a terminal state).
Required: original job must be in status=‘pending’. Each layer_name in the request body must appear in job.user_metadata[‘all_layers’]. Unknown layer names return HTTP 422 with the list of unrecognized names.
Returns HTTP 202 with per-layer outcomes. Partial success is possible: each layer result carries status=‘queued’ or status=‘failed’ with a user-safe error message.
Permission: same as POST /ingest/commit/{job_id} — ‘upload’ capability.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”Request body for POST /ingest/commit-fan-out/{job_id}.
Converts one pending IngestJob (multi-layer file) into N independent ingest tasks — one per requested layer. Maximum 50 layers per request.
object
Layers to ingest as separate datasets. Maximum 50 per request.
One layer to ingest as a separate dataset from a multi-layer source.
Example generated
{ "layers": [ { "layer_name": "example", "title": "example" } ]}Responses
Section titled “ Responses ”Successful Response
Response from POST /ingest/commit-fan-out/{job_id}.
object
The original job_id (parent). Use for client-side correlation.
Per-layer outcomes in the same order as the request layers.
Per-layer outcome from the fan-out commit operation.
object
Layer name from the request.
‘queued’ if the task was dispatched; ‘failed’ if an error occurred.
Example
{ "results": [ { "status": "queued" } ]}Bad request — invalid payload
object
Example
{ "type": "about:blank"}Unauthorized — missing or invalid credentials
object
Example
{ "type": "about:blank"}Forbidden — caller lacks write access
object
Example
{ "type": "about:blank"}Not found
object
Example
{ "type": "about:blank"}Conflict — resource state prevents the operation
object
Example
{ "type": "about:blank"}Validation error
object
Example
{ "type": "about:blank"}Internal server error
object
Example
{ "type": "about:blank"}