Stac Import
const url = 'https://example.com/services/stac/import';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","items":[{"id":"example","collection":"example","title":"example","data_asset_href":"example","item_href":"example","data_asset_key":"example","bbox":[1],"epsg":1,"datetime_start":"example","datetime_end":"example","keywords":[]}],"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 '{ "url": "example", "items": [ { "id": "example", "collection": "example", "title": "example", "data_asset_href": "example", "item_href": "example", "data_asset_key": "example", "bbox": [ 1 ], "epsg": 1, "datetime_start": "example", "datetime_end": "example", "keywords": [] } ], "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
STAC API URL for provenance.
Items to import (max 50 per request).
object
STAC item ID.
Title to use for the GeoLens dataset.
URL of the COG asset to reference.
Keywords from STAC collection.
Visibility for imported datasets.
Responses
Section titled “ Responses ”Successful Response
object
Number of datasets created.
Number of items skipped (duplicates).
Number of items that failed.
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