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

حساب و کلیدها

اعتبارنامهٔ درخواست، کلیدهای API و گزارش تغییرها.

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

Is the API up#

دسترسی
بدون اعتبارنامه

پاسخ

200Ok

  • okbooleanالزامی

خطاها

وضعیتتوضیح
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/healthz"
GET/v1/whoami

The calling credential#

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

پاسخ

200WhoAmI

  • accountstring (uuid)الزامی
  • teamstringالزامی
  • emailstringالزامی
  • keystringالزامی

    key id, or s:<session id>

  • rolestringالزامی

    one of owner, admin, developer, billing, viewer

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/whoami" \
  -H "Authorization: Bearer $KEY"
GET/v1/keys

List API keys#

Never the secrets; revoked keys included.

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

پاسخ

200object

  • keysKey[]الزامی
    • idstringالزامی

      pattern ^[0-9a-f]{12}$

    • namestringالزامی
    • rolestringالزامی

      one of owner, admin, developer, billing, viewer

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

      person:<uuid>, key:<id>, build:<uuid> or device

    • last_used_atstring (date-time) | null
    • expires_atstring (date-time) | null
    • revoked_atstring (date-time) | null
    • replaced_bystring | null

خطاها

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

نمونه

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

Make an API key#

The key is returned once.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
owner, admin, developer (no wider than the caller; not a build's key)
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

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

  • namestring

    up to 100 characters

  • rolestring

    one of owner, admin, developer, billing, viewer

  • expires_in_daysinteger

    1–3650

پاسخ

201KeyCreated

  • idstringالزامی
  • namestringالزامی
  • rolestringالزامی

    one of owner, admin, developer, billing, viewer

  • expires_atstring (date-time) | null
  • keystringالزامی

    the full chk_ key, shown once

خطاها

وضعیتتوضیح
400Bad request: bad_role, bad_expiry, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, role_too_wide, step_up_required
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/keys" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"ci","role":"owner","expires_in_days":1}'
DELETE/v1/keys/{id}

Revoke a key#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
any for its own key; owner or admin for others (never a wider key)
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

پارامترها

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

    key id

    pattern ^[0-9a-f]{12}$

پاسخ

200object

  • idstring
  • revokedboolean

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/keys/7e5926b6f29c" \
  -H "Authorization: Bearer $KEY"
POST/v1/keys/{id}/rotate

Rotate a key#

A new key with the same name, role and expiry; the old one works for 24 hours more.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
owner, admin, developer (not a wider key; not a build's key)
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

پارامترها

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

    key id

    pattern ^[0-9a-f]{12}$

پاسخ

201KeyRotated

  • idstringالزامی
  • namestring
  • rolestring

    one of owner, admin, developer, billing, viewer

  • keystringالزامی

    shown once

  • old_key_valid_untilstring (date-time)الزامی

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/keys/7e5926b6f29c/rotate" \
  -H "Authorization: Bearer $KEY"
GET/v1/audit

Audit log#

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

پارامترها

  • limitintegerکوئری

    1-500, default 100

    1–500 · default 100

  • beforeintegerکوئری

    an event id; only older events (paging with next_before)

  • personstringکوئری

    person:<uuid> or key:<id>

  • projectstringکوئری

    a project name

  • typestringکوئری

    one of deploy, project, env, domain, store, team, key, alert, billing, auth, support

  • fromstringکوئری

    a day (2026-11-04, in the caller's time zone) or an ISO 8601 time

  • tostringکوئری

    a day (included) or an ISO 8601 time

پاسخ

200object

  • eventsAuditEvent[]الزامی
  • actorsmap of Actor
  • next_beforeinteger | null

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/audit" \
  -H "Authorization: Bearer $KEY"
GET/v1/audit/actors

People and keys in the activity#

The people and API keys that appear in the last 180 days of activity.

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

پاسخ

200object

  • actorsobject[]الزامی
    • valuestring
    • kindstring
    • idstring
    • namestring | null
    • emailstring | null

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/audit/actors" \
  -H "Authorization: Bearer $KEY"
GET/v1/audit/last

Who created and who last changed named things#

One request for a page of names (up to 200, comma-separated).

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

پارامترها

  • targetsstringکوئریالزامی

    names or ids separated by commas

پاسخ

200object

  • targetsmap of objectالزامی
  • actorsmap of Actor

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/audit/last?targets=targets" \
  -H "Authorization: Bearer $KEY"