رفتن به محتوا
cloudhostمستندات
مرجع API

فضای ذخیره‌سازی

باکت برای هر کلاینت ذخیره‌سازی، و کلید ذخیرهٔ تیم.

توضیح هر مسیر به انگلیسی است، همان متنی که مرجع از کد ساخته می‌شود. مسیرها، نام فیلدها و کدها همان‌اند که در درخواست می‌نویسید.
GET/v1/buckets

List buckets and the storage endpoint#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پاسخ

200BucketList

  • endpointstringالزامی
  • bucketsBucket[]الزامی
    • namestringالزامی
    • created_atstring (date-time)
    • size_bytesinteger | null

      last measured

    • objectsinteger | null
    • statusstring

      one of available

    • projectsConnected[]

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

نمونه

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).

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

بدنهٔ درخواستapplication/json

  • namestringالزامی

    3-63 lowercase letters, digits and single hyphens

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

پاسخ

201BucketCreated

  • namestringالزامی
  • endpointstringالزامی
  • access_keystringالزامی
  • secret_keystring

    only when the key was just made

  • notestring

خطاها

وضعیتتوضیح
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

نمونه

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

Get a bucket#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the bucket's name

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

پاسخ

200Bucket

  • namestringالزامی
  • created_atstring (date-time)
  • size_bytesinteger | null

    last measured

  • objectsinteger | null
  • statusstring

    one of available

  • projectsConnected[]
  • endpointstringالزامی

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

نمونه

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).

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the bucket's name

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

پاسخ

200Deleted

  • namestring
  • deletedbooleanالزامی

خطاها

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

نمونه

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.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

پاسخ

200StorageCredentials

  • endpointstringالزامی
  • access_keystringالزامی
  • secret_keystringالزامی
  • regionstringالزامی

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
500internal: an unexpected failure
503Unavailable: storage

نمونه

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#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the bucket's name

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

  • rangestringکوئری

    24h (default), 7d or 30d

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

پاسخ

200ResourceObservability

  • rangestringالزامی
  • stepstringالزامی
  • totalsobjectالزامی
  • metricsobject[]الزامی
  • seriesobject[]الزامی
  • tablesobject[]

    databases only: the latest top statements

  • notestring

خطاها

وضعیتتوضیح
400Bad request: bad_range
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

نمونه

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