Stac Import
const url = 'https://example.com/services/stac/import';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"items":[{"bbox":[1],"collection":"example","data_asset_href":"example","datetime_end":"example","datetime_start":"example","epsg":1,"id":"example","keywords":[],"title":"example"}],"url":"example","visibility":"private"}'};
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/services/stac/import \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "items": [ { "bbox": [ 1 ], "collection": "example", "data_asset_href": "example", "datetime_end": "example", "datetime_start": "example", "epsg": 1, "id": "example", "keywords": [], "title": "example" } ], "url": "example", "visibility": "private" }'Import selected STAC items as raster datasets.
Each item is registered as a raster_dataset record referencing the remote COG asset URL. Titiler serves the tiles directly from the remote source — no file download required.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Items to import (max 50 per request).
object
URL of the COG asset to reference.
STAC item ID.
Keywords from STAC collection.
Title to use for the GeoLens dataset.
STAC API URL for provenance.
Visibility for imported datasets.
Responses
Section titled “ Responses ”Successful Response
object
Number of datasets created.
Number of items that failed.
Number of items skipped (duplicates).
Example
{ "results": [ { "status": "created" } ]}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