Preview File
const url = 'https://example.com/api/ingest/preview/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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/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’.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Query Parameters
Section titled “Query Parameters ”Responses
Section titled “ Responses ”Successful Response
object
Identifier of the ingestion job being previewed.
Detected attribute columns. Each entry includes name, type, and nullability.
object
Up to 5 sample rows from the source file for preview purposes.
object
Name of the layer being previewed. Defaults to the source filename for single-layer files.
object
Identifier of the raster ingestion job being previewed.
Number of raster bands.
Raster width in pixels.
Raster height in pixels.
Pixel data type (e.g. ‘uint8’, ‘float32’).
Pixel resolution along the X axis in CRS units.
Pixel resolution along the Y axis in CRS units.
Whether the source file is already a Cloud-Optimized GeoTIFF.
Explanation of COG compliance status. Lists missing requirements when not compliant.
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
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}