Skip to content
cloudhostDocs
API reference

Storage

Buckets for any storage client, and the team's storage key.

GET/v1/buckets

List buckets and the storage endpoint#

Credential
An API key or a dashboard session
Roles
Any role

Response

200BucketList

  • endpointstringrequired
  • bucketsBucket[]required
    • namestringrequired
    • created_atstring (date-time)
    • size_bytesinteger | null

      last measured

    • objectsinteger | null
    • statusstring

      one of available

    • projectsConnected[]

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/buckets" \
  -H "Authorization: Bearer $KEY"
POST/v1/buckets

Create a bucket#

The team's first bucket also creates its storage key and returns the secret once (step-up for that one only).

Credential
An API key or a dashboard session
Roles
owner, admin, developer
Step-up
With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.

Request bodyapplication/json

  • namestringrequired

    3-63 lowercase letters, digits and single hyphens

    pattern ^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$

Response

201BucketCreated

  • namestringrequired
  • endpointstringrequired
  • access_keystringrequired
  • secret_keystring

    only when the key was just made

  • notestring

Errors

StatusDescription
400Bad request: bad_name, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
409Conflict: name_taken
500internal: an unexpected failure
503Unavailable: storage

Example

curl -X POST "https://api.ibel.ai/v1/buckets" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"uploads"}'
GET/v1/buckets/{name}

Get a bucket#

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • namestringpathrequired

    the bucket's name

    pattern ^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$

Response

200Bucket

  • namestringrequired
  • created_atstring (date-time)
  • size_bytesinteger | null

    last measured

  • objectsinteger | null
  • statusstring

    one of available

  • projectsConnected[]
  • endpointstringrequired

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/buckets/uploads" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/buckets/{name}

Delete an empty bucket#

Refused while a live version binds it (checked after the role and the name).

Credential
An API key or a dashboard session
Roles
owner, admin, developer

Parameters

  • namestringpathrequired

    the bucket's name

    pattern ^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$

Response

200Deleted

  • namestring
  • deletedbooleanrequired

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: bound, not_empty
500internal: an unexpected failure
503Unavailable: storage

Example

curl -X DELETE "https://api.ibel.ai/v1/buckets/uploads" \
  -H "Authorization: Bearer $KEY"
POST/v1/storage/credentials

Create or rotate the storage key#

The old secret stops at once.

Credential
An API key or a dashboard session
Roles
owner, admin, developer
Step-up
With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.

Response

200StorageCredentials

  • endpointstringrequired
  • access_keystringrequired
  • secret_keystringrequired
  • regionstringrequired

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
500internal: an unexpected failure
503Unavailable: storage

Example

curl -X POST "https://api.ibel.ai/v1/storage/credentials" \
  -H "Authorization: Bearer $KEY"
GET/v1/buckets/{name}/observability

Size, objects and requests per hour#

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • namestringpathrequired

    the bucket's name

    pattern ^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$

  • rangestringquery

    24h (default), 7d or 30d

    one of 24h, 7d, 30d · default "24h"

Response

200ResourceObservability

  • rangestringrequired
  • stepstringrequired
  • totalsobjectrequired
  • metricsobject[]required
  • seriesobject[]required
  • tablesobject[]

    databases only: the latest top statements

  • notestring

Errors

StatusDescription
400Bad request: bad_range
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/buckets/uploads/observability" \
  -H "Authorization: Bearer $KEY"