Preview Service Layer
const url = 'https://example.com/api/services/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"}'};
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/services/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" }'Preview a selected remote layer via ogrinfo and create a pending IngestJob.
Validates the URL against SSRF, builds the GDAL driver source string, runs ogrinfo to extract metadata and sample rows, then creates an IngestJob ready for the existing commit flow.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Normalized service URL from a previous probe response.
Service type from the probe response, e.g. ‘WFS 2.0.0’ or ‘ArcGIS FeatureServer’.
Name of the specific layer to preview, from the probe layers list.
Example generated
{ "url": "example", "service_type": "example", "layer_name": "example", "layer_title": "example", "layer_id": 1, "token": "example", "object_id_field": "example"}Responses
Section titled “ Responses ”Successful Response
object
IngestJob ID for the preview. Use this to commit the import.
Detected attribute columns: [{‘name’: str, ‘type’: str}, …].
object
Up to 5 sample rows for preview display.
object
Layer name as it appears in the remote service.
Example generated
{ "job_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_filename": "example", "columns": [ { "additionalProperty": "example" } ], "crs": 1, "geometry_type": "example", "feature_count": 1, "sample_rows": [ {} ], "layer_name": "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"}