Preview Service Layer
const url = 'https://example.com/services/preview/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"layer_id":1,"layer_name":"example","layer_title":"example","object_id_field":"example","service_type":"example","token":"example","url":"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/services/preview/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "layer_id": 1, "layer_name": "example", "layer_title": "example", "object_id_field": "example", "service_type": "example", "token": "example", "url": "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
Name of the specific layer to preview, from the probe layers list.
Service type from the probe response, e.g. ‘WFS 2.0.0’ or ‘ArcGIS FeatureServer’.
Normalized service URL from a previous probe response.
Example generated
{ "layer_id": 1, "layer_name": "example", "layer_title": "example", "object_id_field": "example", "service_type": "example", "token": "example", "url": "example"}Responses
Section titled “ Responses ”Successful Response
object
Detected attribute columns: [{‘name’: str, ‘type’: str}, …].
object
IngestJob ID for the preview. Use this to commit the import.
Layer name as it appears in the remote service.
Up to 5 sample rows for preview display.
object
Example generated
{ "columns": [ { "additionalProperty": "example" } ], "crs": 1, "feature_count": 1, "geometry_type": "example", "job_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "layer_name": "example", "sample_rows": [ {} ], "source_filename": "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"}