Storage

A presigned GET (download) or PUT (upload) URL for one key, valid 1 minute to 7 days

post/storage/buckets/{bucketId}/presign

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/storage/buckets/{bucketId}/presign
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

bucketIdstring uuid required

Request body

keystring required
method'GET' | 'PUT'
expiresInSecondsinteger
contentTypestring

PUT only: the Content-Type the upload must send

downloadboolean

GET only: make browsers save the file instead of displaying it

Response

The URL

urlstring required
method'GET' | 'PUT' required
expiresAtstring required

ISO-8601 timestamp

headersobject required

headers the request must send exactly (PUT with a content type)

Changes

No recorded changes to this operation across all 1 revision of this API.