Skip to content
getgeolens.com

Download Cog

GET
/datasets/{dataset_id}/download/cog
curl --request GET \
--url https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/download/cog \
--header 'Authorization: Bearer <token>'

Download the Cloud-Optimized GeoTIFF for a raster dataset.

Local storage: streams the COG file with Content-Type image/tiff. S3 storage: returns a 302 redirect to a presigned GET URL (1-hour expiry). Accepts standard auth or ?token= JWT query parameter for browser downloads.

KNOWN-01 (Phase 1071): user may be None when a no-sub anonymous download token (issued by POST /auth/download-token/{id} for a public dataset) is presented on ?token=. The function branches on user-None to enforce public visibility and emit the audit row with user_id=NULL.

dataset_id
required
Dataset Id
string format: uuid

Successful Response

Bad request — invalid query parameters or payload

Not found

Validation error

Internal server error