Reupload Service Preview
const url = 'https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reupload/service/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","service_type":"example","layer_name":"example","layer_title":"example","layer_id":1,"token":"example","object_id_field":"example","auth":{"method":"bearer","token":"example","username":"example","password":"example","header_name":"example","header_value":"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/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reupload/service/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "service_type": "example", "layer_name": "example", "layer_title": "example", "layer_id": 1, "token": "example", "object_id_field": "example", "auth": { "method": "bearer", "token": "example", "username": "example", "password": "example", "header_name": "example", "header_value": "example" } }'Preview a remote service layer for dataset re-upload.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body required
Section titled “ Request Body required ”object
How one request authenticates to the remote service it names.
object
How the credential is presented to the remote service. Omit the whole auth object for a public service.
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
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
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Bad gateway — an upstream provider failed
Service unavailable — the database could not serve the request