Preview Service Layer
POST
/services/preview/
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 ” Media type application/json
ServicePreviewRequest
object
url
required
Url
Normalized service URL from a previous probe response.
string
service_type
required
Service Type
Service type from the probe response, e.g. ‘WFS 2.0.0’ or ‘ArcGIS FeatureServer’.
string
layer_name
required
Layer Name
Name of the specific layer to preview, from the probe layers list.
string
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
Media type application/json
ServicePreviewResponse
object
job_id
required
Job Id
IngestJob ID for the preview. Use this to commit the import.
string format: uuid
columns
required
Columns
Detected attribute columns: [{‘name’: str, ‘type’: str}, …].
Array<object>
object
key
additional properties
string
sample_rows
required
Sample Rows
Up to 5 sample rows for preview display.
Array<object>
object
key
additional properties
any
layer_name
required
Layer Name
Layer name as it appears in the remote service.
string
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"}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}