Palbase Storage · API
/storage/buckets/{bucket}/objects/{path}Read an object
The object's bytes, or a rendition's (variant). Entity tags and one byte range are honoured; what is served is made inert (nosniff, a sandboxing CSP, and a download for any type a browser does not render safely). Counts toward the project's egress.
Called by your server, with the project's secret key.
Path
bucketstring · requiredThe bucket's name: a lowercase letter, then lowercase letters, digits and -, 2 to 63 characters.pathstring · requiredThe object's path as ONE percent-encoded segment: a/b.jpg is a%2Fb.jpg. Segments are separated by /, none empty, . or ..; 1 to 1024 bytes of UTF-8.Query
variantstring · optionalA rendition the bucket made of the picture, by its name; absent: the original. A variant is served whole (no range).Headers
Rangestring · optionalOne byte range of the original (bytes=start-end, bytes=start-, bytes=-suffix); answered 206. Several ranges are answered whole.If-None-Matchstring · optionalThe entity tag the caller holds; a match is answered 304 with no body.curl -X GET "https://<your-ref>.palbase.studio/storage/buckets/<bucket>/objects/<path>" \
-H "apikey: $PALBASE_SECRET_KEY"Responses
200The object's bytes (a download, unless the type is one a browser renders safely)
206The range asked for
304The caller's entity tag still matches
400The request is malformed: a field, a path or a parameter is wrong
401No key, or not a key of this project (the edge's answer)
403Not the project's secret key; or, on a credential-less route, a private object or a link that is not valid for it
404No such bucket, object or variant
416The range is outside the object
429The project's request rate, or its storage quota for the period, is used up — or, slowed for its month's traffic, it has as many downloads under way as are paced at once; Retry-After says when to try again
503The platform could not answer now; retrying is safe (Retry-After)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation GetObject of storage's contract.