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

پروژه‌ها

پروژه اجزای یک برنامه را کنار هم نگه می‌دارد، با محیط‌ها. نام‌ها در هر پروژه یکتا هستند.

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

List the team's projects#

With the number of apps, functions and resources in each.

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

پارامترها

  • any
  • any

پاسخ

200object

  • projectsProjectSummary[]الزامی
    • idstringالزامی
    • namestringالزامی
    • created_atstring (date-time)
    • appsintegerالزامی
    • functionsintegerالزامی
    • resourcesintegerالزامی

      its SQL databases, caches, buckets and queues

  • next_cursorstring | null

    send as cursor for the next page; null on the last page

خطاها

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

نمونه

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

Create a project#

Made with its production environment and its own secrets (D191).

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

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

  • namestringالزامی

    lowercase letters, digits and single hyphens, 1-63 characters; unique in the team, whatever its case

پاسخ

201ProjectSummary

  • idstringالزامی
  • namestringالزامی
  • created_atstring (date-time)
  • appsintegerالزامی
  • functionsintegerالزامی
  • resourcesintegerالزامی

    its SQL databases, caches, buckets and queues

  • environmentsstring[]

خطاها

وضعیتتوضیح
400Bad request: bad_name, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
409Conflict: name_taken
500internal: an unexpected failure

نمونه

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

Get a project and what it holds#

Its apps, functions and resources, and the other projects' resources connected to it.

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

پارامترها

  • any

پاسخ

200ProjectDetail

  • idstringالزامی
  • namestringالزامی
  • created_atstring (date-time)
  • appsobject[]الزامی
  • functionsobject[]الزامی
  • databasesResourceRef[]الزامی
  • cachesResourceRef[]الزامی
  • bucketsResourceRef[]الزامی
  • queuesResourceRef[]الزامی
  • connectionsobject[]الزامی

    other projects' resources this project uses, each with its owner

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/projects/my-api" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/projects/{project}

Delete an empty project#

Refused while it holds anything (delete or move it first) or while one of its resources is connected to another project.

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

پارامترها

  • any

پاسخ

200object

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

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/projects/my-api" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/projects/{project}

Rename a project#

Its id, contents and addresses stay.

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

پارامترها

  • any

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

  • namestringالزامی

پاسخ

200object

  • idstring
  • namestring
  • created_atstring (date-time)

خطاها

وضعیتتوضیح
400Bad request: bad_name
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: name_taken
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/projects/my-api" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api"}'
GET/v1/projects/{project}/members

Who may use a project#

The team's unlimited members, and limited members through a grant on the project (their own or a group's). A grant on a project reaches everything in it.

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

پارامترها

  • any
  • any
  • any

پاسخ

200ResourceMembers

  • resourceobject
  • teamobject[]
  • limitedobject[]
  • next_cursorstring | null

    send as cursor for the next page; null on the last page

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/projects/my-api/members" \
  -H "Authorization: Bearer $KEY"
GET/v1/projects/{project}/usage

A project's usage and cost#

Every app's, function's and resource's meters at list price, with their environment instances, summed.

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

پارامترها

  • any
  • daysintegerکوئری

    1–90 · default 30

پاسخ

200ProjectUsage

  • projectProjectRefالزامی
  • daysintegerالزامی
  • fromstring (date-time)
  • tostring (date-time)
  • per_environmentboolean
  • list_rialsintegerالزامی
  • itemsobject[]الزامی
  • notestring

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/projects/my-api/usage" \
  -H "Authorization: Bearer $KEY"
GET/v1/projects/{project}/environments

List a project's environments#

production, development once used, and each live or kept preview, with its addresses and the instance of each resource it uses.

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

پارامترها

  • any
  • any
  • any

پاسخ

200object

  • environmentsEnvironment[]الزامی
    • namestringالزامی

      production, development or preview-<label>

    • kindstringالزامی

      one of production, development, preview

    • keptboolean

      a preview kept past its branch (staging); previews only

    • created_atstring (date-time) | null
    • last_used_atstring (date-time) | null
    • addressesstring[]الزامی
    • instancesobjectالزامی
  • next_cursorstring | null

    send as cursor for the next page; null on the last page

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/projects/my-api/environments" \
  -H "Authorization: Bearer $KEY"
GET/v1/projects/{project}/environments/{environment}

Get an environment#

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

پارامترها

  • any
  • environmentstringمسیرالزامی

    production, development or preview-<label>

پاسخ

200Environment

  • namestringالزامی

    production, development or preview-<label>

  • kindstringالزامی

    one of production, development, preview

  • keptboolean

    a preview kept past its branch (staging); previews only

  • created_atstring (date-time) | null
  • last_used_atstring (date-time) | null
  • addressesstring[]الزامی
  • instancesobjectالزامی

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/projects/my-api/environments/environment" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/projects/{project}/environments/{environment}

Delete a preview#

Its addresses, its caches and queues, and its database branches.

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

پارامترها

  • any
  • environmentstringمسیرالزامی

    production, development or preview-<label>

پاسخ

200object

  • namestringالزامی
  • deletedbooleanالزامی
  • database_branchesstring[]
  • cachesstring[]
  • queuesstring[]

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/projects/my-api/environments/environment" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/projects/{project}/environments/{environment}

Keep a preview, or let it expire#

A kept preview stays after its branch is merged or deleted, and is not deleted when idle (staging).

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

پارامترها

  • any
  • environmentstringمسیرالزامی

    production, development or preview-<label>

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

  • keptbooleanالزامی

پاسخ

200Environment

  • namestringالزامی

    production, development or preview-<label>

  • kindstringالزامی

    one of production, development, preview

  • keptboolean

    a preview kept past its branch (staging); previews only

  • created_atstring (date-time) | null
  • last_used_atstring (date-time) | null
  • addressesstring[]الزامی
  • instancesobjectالزامی

خطاها

وضعیتتوضیح
400Bad request: bad_kept
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: not_a_preview
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/projects/my-api/environments/environment" \
  -H "Authorization: Bearer $KEY" \
  -d '{"kept":true}'
POST/v1/projects/{project}/environments/development/reset

Reset development#

Each SQL database's development branch made again from main, and development's caches and queues emptied. The preview bucket it shares stays.

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

پارامترها

  • any

پاسخ

200object

  • environmentstringالزامی
  • databasesobject[]الزامی
  • cachesstring[]
  • queuesstring[]

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/projects/my-api/environments/development/reset" \
  -H "Authorization: Bearer $KEY"
GET/v1/deleted

The team's deleted items#

Functions, apps, databases, caches and queues deleted in the last 7 days, across the team's projects (?project= for one), newest first. Each is switched off and unreachable, its name reserved, until it is restored or the purge job removes it.

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

پارامترها

  • any
  • kindstringکوئری

    only this kind's (functions, apps, databases, caches, queues)

  • limitintegerکوئری

    1–500 · default 100

  • cursorstringکوئری

    the next_cursor of the page before

پاسخ

200DeletedItemList

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

      its id, as before it was deleted

    • kindstringالزامی

      one of function, app, database, cache, queue

    • namestringالزامی
    • projectProjectRefالزامی
    • deleted_atstring (date-time)الزامی
    • deleted_bystringالزامی

      person:<id> or key:<id>, as in the audit log

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

      when the purge job removes it for good (7 days after deleted_at)

    • stored_bytesinteger | nullالزامی

      the stored data that bills while it waits (a database's, a cache's), last measured; null for apps, functions and queues

  • next_cursorstring | nullالزامی

    send as cursor for the next page; null on the last page

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/deleted" \
  -H "Authorization: Bearer $KEY"
GET/v1/projects/{project}/deleted

A project's deleted items#

Its functions, apps, databases, caches and queues deleted in the last 7 days, newest first.

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

پارامترها

  • any
  • kindstringکوئری

    only this kind's (functions, apps, databases, caches, queues)

  • limitintegerکوئری

    1–500 · default 100

  • cursorstringکوئری

    the next_cursor of the page before

پاسخ

200DeletedItemList

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

      its id, as before it was deleted

    • kindstringالزامی

      one of function, app, database, cache, queue

    • namestringالزامی
    • projectProjectRefالزامی
    • deleted_atstring (date-time)الزامی
    • deleted_bystringالزامی

      person:<id> or key:<id>, as in the audit log

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

      when the purge job removes it for good (7 days after deleted_at)

    • stored_bytesinteger | nullالزامی

      the stored data that bills while it waits (a database's, a cache's), last measured; null for apps, functions and queues

  • next_cursorstring | nullالزامی

    send as cursor for the next page; null on the last page

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/projects/my-api/deleted" \
  -H "Authorization: Bearer $KEY"
GET/v1/projects/{project}/deleted/{kind}/{name}

A deleted item#

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

پارامترها

  • any
  • kindstringمسیرالزامی

    functions, apps, databases, caches or queues

    one of functions, apps, databases, caches, queues

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

    the deleted item's name (any case) or its id

پاسخ

200DeletedItem

  • idstringالزامی

    its id, as before it was deleted

  • kindstringالزامی

    one of function, app, database, cache, queue

  • namestringالزامی
  • projectProjectRefالزامی
  • deleted_atstring (date-time)الزامی
  • deleted_bystringالزامی

    person:<id> or key:<id>, as in the audit log

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

    when the purge job removes it for good (7 days after deleted_at)

  • stored_bytesinteger | nullالزامی

    the stored data that bills while it waits (a database's, a cache's), last measured; null for apps, functions and queues

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/projects/my-api/deleted/kind/my-api" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/projects/{project}/deleted/{kind}/{name}

Delete a deleted item now#

Removes it for good without waiting for the purge job: its data and history are erased and it cannot be restored.

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

پارامترها

  • any
  • kindstringمسیرالزامی

    functions, apps, databases, caches or queues

    one of functions, apps, databases, caches, queues

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

    the deleted item's name (any case) or its id

پاسخ

200object

  • idstringالزامی
  • kindstringالزامی
  • namestringالزامی
  • deletedbooleanالزامی
  • purgedbooleanالزامی

خطاها

وضعیتتوضیح
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/projects/my-api/deleted/kind/my-api" \
  -H "Authorization: Bearer $KEY"
POST/v1/projects/{project}/deleted/{kind}/{name}/restore

Restore a deleted item#

Puts it back, switched on, under its own name and address, with its data, versions, variables, credentials and settings. Its name stayed reserved, so 409 name_taken cannot normally happen; when it does, or when an app's or function's address is in use (409 address_taken), the item stays in deleted items and nothing is renamed or overwritten. A plan that now allows fewer of them is refused as on create.

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

پارامترها

  • any
  • kindstringمسیرالزامی

    functions, apps, databases, caches or queues

    one of functions, apps, databases, caches, queues

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

    the deleted item's name (any case) or its id

پاسخ

200DeletedItem

  • idstringالزامی

    its id, as before it was deleted

  • kindstringالزامی

    one of function, app, database, cache, queue

  • namestringالزامی
  • projectProjectRefالزامی
  • deleted_atstring (date-time)الزامی
  • deleted_bystringالزامی

    person:<id> or key:<id>, as in the audit log

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

    when the purge job removes it for good (7 days after deleted_at)

  • stored_bytesinteger | nullالزامی

    the stored data that bills while it waits (a database's, a cache's), last measured; null for apps, functions and queues

  • restoredbooleanالزامی

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
402Payment required: free_limit_reached
403Not allowed: forbidden, limit
404Not found: not_found
409Conflict: name_taken, address_taken
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/projects/my-api/deleted/kind/my-api/restore" \
  -H "Authorization: Bearer $KEY"
GET/v1/projects/{project}/connections

A project's connections#

Both ways: this project's resources used by other projects (out), and other projects' resources used here (in).

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

پارامترها

  • any
  • any
  • any

پاسخ

200object

  • connectionsConnection[]الزامی
    • kindstringالزامی

      one of database, cache, bucket, queue

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

      how the connected project binds it: <owner>/<name>

    • directionstringالزامی

      out: this project's resource used elsewhere; in: another project's used here

      one of in, out

    • projectProjectRefالزامی

      the owning project

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

    send as cursor for the next page; null on the last page

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/projects/my-api/connections" \
  -H "Authorization: Bearer $KEY"
POST/v1/projects/{project}/connections

Connect a resource to another project#

The other project's apps and functions then bind it as <project>/<name>. Called on the owning project. Not for members limited to chosen projects.

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

پارامترها

  • any

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

  • kindstringالزامی

    one of database, cache, bucket, queue

  • namestringالزامی

    the resource's name or id in this project

  • projectstringالزامی

    the other project's name or id

پاسخ

201Connection

  • kindstringالزامی

    one of database, cache, bucket, queue

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

    how the connected project binds it: <owner>/<name>

  • directionstringالزامی

    out: this project's resource used elsewhere; in: another project's used here

    one of in, out

  • projectProjectRefالزامی

    the owning project

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

خطاها

وضعیتتوضیح
400Bad request: bad_kind, bad_name, bad_project
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: same_project, connected
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/projects/my-api/connections" \
  -H "Authorization: Bearer $KEY" \
  -d '{"kind":"database","name":"my-api","project":"my-api"}'
DELETE/v1/projects/{project}/connections/{kind}/{name}/{to}

Remove a connection#

Refused while a live version (production or a preview) of the connected project binds it.

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

پارامترها

  • any
  • kindstringمسیرالزامی

    one of databases, caches, buckets, queues

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

    the resource's name in the project (any case) or its id

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

    the connected project's name or id

پاسخ

200object

  • kindstring
  • idstring
  • namestring
  • projectProjectRef
  • connected_toProjectRef
  • removedboolean

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/projects/my-api/connections/kind/my-api/2026-11-04T06%3A00%3A00Z" \
  -H "Authorization: Bearer $KEY"