Preview File
const url = 'https://example.com/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/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
Detected attribute columns. Each entry includes name, type, and nullability.
object
Identifier of the ingestion job being previewed.
Name of the layer being previewed. Defaults to the source filename for single-layer files.
Up to 5 sample rows from the source file for preview purposes.
object
object
Number of raster bands.
Explanation of COG compliance status. Lists missing requirements when not compliant.
Pixel data type (e.g. ‘uint8’, ‘float32’).
Raster height in pixels.
Whether the source file is already a Cloud-Optimized GeoTIFF.
Identifier of the raster ingestion job being previewed.
Pixel resolution along the X axis in CRS units.
Pixel resolution along the Y axis in CRS units.
Raster width in pixels.
Example generated
{ "columns": [ { "name": "example", "type": "example" } ], "crs": 1, "detected_geometry_columns": {}, "feature_count": 1, "geometry_type": "example", "job_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "layer_name": "example", "layers": [ { "feature_count": 1, "field_count": 1, "name": "example" } ], "sample_rows": [ {} ], "source_filename": "example"}Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “Headers ”Seconds until the request may be retried
Internal server error
Service unavailable — the database could not serve the request