Storage

Create a bucket (private by default). Its S3 name is <name>-<6 random characters>

post/storage/buckets

Request

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

Query parameters

orgIdstring

Organization id (required when you belong to several)

Request body

namestring required
visibility'private' | 'public'

public: every object is readable without credentials at its public URL

quotaBytesinteger

storage quota in bytes (default 1 GiB, capped by what your team has left)

maxObjectsinteger nullable
projectIdstring uuid

link the bucket to a project (it then shows in that project's Storage tab)

Response

Created

idstring uuid required
organizationIdstring uuid required
projectIdstring uuid nullable required

the project this bucket belongs to, if any

namestring required

the name you chose, unique in your team

bucketstring required

the S3 bucket name to use with SDKs and tools (globally unique)

visibility'private' | 'public' required

public: every object is readable without credentials at its public URL

status'provisioning' | 'active' | 'deleting' required

deleting: objects are being removed in the background; the bucket and its keys no longer work

endpointstring required

S3 endpoint (path-style addressing), e.g. https://s3.hostingsurge.app

regionstring required

S3 region to sign requests with

publicUrlstring nullable required

base URL of the objects when the bucket is public: <publicUrl><key>

quotaBytesinteger required
maxObjectsinteger nullable required
createdAtstring required

ISO-8601 timestamp

updatedAtstring required

ISO-8601 timestamp

Changes

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