Palbase Storage · API
/storage/buckets/{bucket}/upload-urlsSign an upload URL
A URL a client PUTs one object to, until it expires (at most 7 days): the bytes go from the client to storage, never through the project's server. It pins the path, a ceiling (max_bytes, never above the bucket's), the bucket's content types and the user the object will belong to (owner_id).
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.Request body
expires_ininteger · requiredSeconds the URL works, 1 to 604800.max_bytesinteger (int64) · optionalA ceiling below the bucket's own, in bytes.owner_idstring · optionalThe user the object will belong to; it is deleted with them.pathstring · requiredThe object's path.curl -X POST "https://<your-ref>.palbase.studio/storage/buckets/<bucket>/upload-urls" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"expires_in":1,"path":"string"}'Responses
200The URL
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
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 CreateUploadUrl of storage's contract.