Sign a URL for a file
Returns a signed URL that downloads one file or, with upload, uploads it. The URL is a path on the environment’s own address and works without a token until it expires. A download URL needs data:read. An upload URL needs data:write.
/_luna/tenants/{tenant}/files/{type}/{bucket}/signAuthorizationBearer token · headerrequiredAn account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.
data:readtenantstringrequiredThe tenant, by its name.
typestringrequiredThe luna type, by its name.
bucketstringrequiredThe bucket, by its name.
application/jsonkeyanyrequiredThe luna's key as JSON, such as {"id":"a"}. For a type keyed by one field, the value of that field alone also works.
pathstringrequiredThe file's path in the bucket.
uploadboolean | nullTrue for a URL that uploads the file with PUT. False, the default, for one that downloads it with GET.
expiresInMsinteger<int64> | nullHow long the URL works for, in milliseconds.
contentTypestring | nullThe content type an upload must send.
maxSizeinteger<int64> | nullThe largest upload the URL accepts, in bytes.
The signed URL.
urlstringrequiredA path on the environment's own address, with the signature in its query.
methodstringrequiredPUT for an upload, GET for a download.
expiresinteger<int64>requiredWhen the URL stops working, in milliseconds since the Unix epoch.
The request failed. The status says how and error.message says why.
errorErrorDetailrequiredShow propertiesHide properties
codestring | nullA code for programs to branch on, when the error has one.
messagestringrequiredWhat went wrong, in a sentence a person can read.