Download Cog
const url = 'https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/download/cog';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/download/cogDownload the Cloud-Optimized GeoTIFF for a raster dataset.
On S3 storage with presigned downloads enabled, answers 302 to a
short-lived presigned URL (at most 5 minutes, and never past the expiry of
a ?token= download token); otherwise streams the object with
Content-Type image/tiff. Even then, a GET carrying If-Match, or a resume
whose If-Range no longer matches, is streamed. A COG imported by reference
redirects to its origin.
Accepts standard auth or ?token= JWT query parameter for browser downloads.
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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Responses
Section titled “ Responses ”The whole COG file
One byte range of the COG file
Redirect to the COG’s object-storage or remote URL
The caller already holds this version of the file
Bad request — invalid query parameters or payload
Unauthenticated — a credential was supplied and could not be resolved (expired, revoked, or malformed). Sending no credential at all is not an error on these operations; they answer anonymously with the public subset.
Forbidden — caller lacks access to this resource
Not found
Precondition failed — the caller’s If-Match no longer matches the current representation
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