Skip to content
getgeolens.com

Preview File

POST
/ingest/preview/{job_id}
curl --request POST \
--url https://example.com/api/ingest/preview/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Run preview on a staged file and return preview data.

For vector files: returns columns, CRS, geometry type, feature count, sample rows. For raster files: returns band count, CRS, resolution, compliance status. Only callable on jobs with status ‘pending’.

job_id
required
Job Id
string format: uuid
layer_name
Any of:
string

Sheet/layer name for multi-layer files

Successful Response

Media type application/json
Any of:
PreviewResponse
object
job_id
required
Job Id

Identifier of the ingestion job being previewed.

string format: uuid
source_filename
required
Any of:
string
columns
required
Columns

Detected attribute columns. Each entry includes name, type, and nullability.

Array<object>
ColumnPreview
object
name
required
Name
string
type
required
Type
string
crs
required
Any of:
integer
geometry_type
required
Any of:
string
feature_count
required
Any of:
integer
sample_rows
required
Sample Rows

Up to 5 sample rows from the source file for preview purposes.

Array<object>
object
key
additional properties
any
layer_name
required
Layer Name

Name of the layer being previewed. Defaults to the source filename for single-layer files.

string
layers
Any of:
Array<object>
LayerPreview
object
name
required
Name
string
feature_count
Any of:
integer
field_count
Any of:
integer
detected_geometry_columns
Any of:
object
key
additional properties
any
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",
"layers": [
{
"name": "example",
"feature_count": 1,
"field_count": 1
}
],
"detected_geometry_columns": {}
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
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": {}
}
]
}