Reupload Preview
const url = 'https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reupload/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"layer_name":"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/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reupload/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "layer_name": "example" }'Preview the schema diff between old dataset and new upload.
When the uploaded file contains multiple layers, the response includes
all_layers (for frontend layer-select UI) and previous_source_layer
(pre-selection hint from the most-recent completed IngestJob for this
dataset). Pass layer_name in the request body to target a specific
layer; omit it to get the default first-layer metadata.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body
Section titled “Request Body ”Example generated
{ "layer_name": "example"}Responses
Section titled “ Responses ”Successful Response
object
object
object
object
Columns present in new but not old schema
object
Columns present in old but not new schema
object
Columns whose data type changed
object
Row_count_new minus row_count_old
object
Example generated
{ "job_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_filename": "example", "columns": [ { "name": "example", "type": "example" } ], "crs": 1, "geometry_type": "example", "feature_count": 1, "sample_rows": [ {} ], "layer_name": "example", "schema_diff": { "columns_added": [ { "name": "example", "type": "example" } ], "columns_removed": [ { "name": "example", "type": "example" } ], "type_changes": [ { "name": "example", "old_type": "example", "new_type": "example" } ], "row_count_old": 1, "row_count_new": 1, "row_count_delta": 1 }, "all_layers": [ {} ], "previous_source_layer": "example"}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"}