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. For a 3D Tiles tileset: returns its version, root geometric error, bounding volume kind, extent and unpacked size, read from the archive’s directory and tileset.json without unpacking it. For a COPC point cloud: returns its point count and format, CRS, extent, elevation range and size, read from its header and hierarchy. 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.
What a staged 3D Tiles tileset archive holds, read without unpacking it.
object
Identifier of the tileset ingestion job being previewed.
The tileset’s asset.version from its tileset.json.
The kind of the root tile’s bounding volume.
Total size of the archive’s files once unpacked.
Number of entries, files and folders, in the archive.
What a staged COPC point cloud holds, read from its header and hierarchy.
object
Identifier of the point cloud ingestion job being previewed.
Number of points in the file.
The file’s LAS point data record format.
EPSG code of the horizontal coordinate reference system.
The extent as [west, south, east, north] in degrees; west > east when it crosses the antimeridian.
Lowest elevation, in the file’s units.
Highest elevation, in the file’s units.
Size of the file in bytes.
Example
{ "version": "1.0", "bounding_volume": "region"}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