Download/preview a file
Download/preview a file (media:read). Supports Range requests.
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
With w, returns a thumbnail at most w pixels wide instead of the original (PNG, JPEG, GIF first frame, WebP). Thumbnails are generated on first request and cached on disk; JPEG for opaque images, PNG when there is transparency; EXIF orientation is applied. Images are never upscaled: when the original is not wider than w, it is returned as is, as it is for AVIF and for images over 50 megapixels (not decoded server-side). Thumbnail responses carry an ETag and Cache-Control: private, max-age=31536000, immutable (a media id never changes content). Other file types answer 422 when w is set.
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
id*stringdownload?stringForce attachment disposition
w?integerThumbnail width in pixels (images only)
1603206401280File bytes (or the thumbnail), with the stored MIME type
response?file*/*binarycurl -X GET 'https://staqly.example.com/v1/media/string'"string"