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

فانکشن‌ها

فانکشن‌های استاندارد وب. همان مسیرهای برنامه‌ها.

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

List functions#

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

پاسخ

200object

  • functionsProject[]الزامی
    • idstring (uuid)الزامی
    • namestringالزامی
    • kindstringالزامی

      one of function, app

    • urlstringالزامی
    • active_versioninteger | nullالزامی
    • created_atstring (date-time)الزامی
    • statusstringالزامی

      running: served a request (a static file or its code) in the last 3 minutes, or static files only (always running once deployed); idle: deployed and quiet, wakes on the next request

      one of running, idle, not_deployed

    • created_byActor | null

      who created it; null when not known

    • connectedobject[]

      the stores its production version uses

    • last_buildobject | nullالزامی

خطاها

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

نمونه

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

Create a function#

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

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

  • namestringالزامی

    one DNS label: lowercase letters, digits and hyphens, 1-63 characters, no --

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

201Project

  • idstring (uuid)الزامی
  • namestringالزامی
  • kindstringالزامی

    one of function, app

  • urlstringالزامی
  • active_versioninteger | nullالزامی
  • created_atstring (date-time)الزامی
  • statusstringالزامی

    running: served a request (a static file or its code) in the last 3 minutes, or static files only (always running once deployed); idle: deployed and quiet, wakes on the next request

    one of running, idle, not_deployed

  • created_byActor | null

    who created it; null when not known

  • connectedobject[]

    the stores its production version uses

  • last_buildobject | nullالزامی

خطاها

وضعیتتوضیح
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/functions" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api"}'
GET/v1/functions/{name}

Get a function#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200Project

  • idstring (uuid)الزامی
  • namestringالزامی
  • kindstringالزامی

    one of function, app

  • urlstringالزامی
  • active_versioninteger | nullالزامی
  • created_atstring (date-time)الزامی
  • statusstringالزامی

    running: served a request (a static file or its code) in the last 3 minutes, or static files only (always running once deployed); idle: deployed and quiet, wakes on the next request

    one of running, idle, not_deployed

  • created_byActor | null

    who created it; null when not known

  • connectedobject[]

    the stores its production version uses

  • last_buildobject | nullالزامی

خطاها

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

نمونه

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

Delete a function#

With its versions, previews, secrets and logs; its address stops answering at once and the name is free again. Refused while it has cron triggers, or while its live version or a preview binds a database, cache or bucket (checked after the role and the name, before step-up).

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200object

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

    how many versions were removed

خطاها

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

نمونه

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

Rename a function#

Its address and its previews' move to the new name at once and the old ones stop answering; custom domains stay. Its id, versions, variables, crons, alerts, logs and usage stay with it. The old name stays reserved for 15 minutes. Refused while a build is queued or running, or when a preview's address would pass 63 characters.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

  • namestringالزامی

    one DNS label: lowercase letters, digits and hyphens, 1-63 characters, no --

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200Project

  • idstring (uuid)الزامی
  • namestringالزامی
  • kindstringالزامی

    one of function, app

  • urlstringالزامی
  • active_versioninteger | nullالزامی
  • created_atstring (date-time)الزامی
  • statusstringالزامی

    running: served a request (a static file or its code) in the last 3 minutes, or static files only (always running once deployed); idle: deployed and quiet, wakes on the next request

    one of running, idle, not_deployed

  • created_byActor | null

    who created it; null when not known

  • connectedobject[]

    the stores its production version uses

  • last_buildobject | nullالزامی

خطاها

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

نمونه

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

List versions (newest 100)#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200object

  • versionsVersion[]الزامی
    • numberintegerالزامی
    • bundle_hashstring | null

      sha256, hex

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

    • manifest_hashstring | null

      sha256, hex

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

    • runtime_datestring
    • created_bystring
    • created_atstring (date-time)
    • activebooleanالزامی

      live in production

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/versions" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/versions

Upload a version#

A function needs modules and no files. JSON body up to 20 MiB.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

  • main_modulestring

    entry module name; required with modules

    pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,99}\.m?js$

  • modulesobject

    module name -> source; 1-50 modules, 10 MiB in all; required for a function

  • runtime_datestring (date)

    YYYY-MM-DD, 2022-01-01 to today; default today

  • varsobject

    up to 64; names ^[A-Za-z_][A-Za-z0-9_]{0,63}$

  • bindingsobject

    env name -> the team's database, cache or bucket

  • filesobject

    apps only: path -> file; the count, each size and the total by plan (GET /v1/limits)

  • headers_filestring

    apps only: a _headers file

  • redirects_filestring

    apps only: a _redirects file

  • spaboolean

    apps only: serve /index.html for unknown paths

پاسخ

201VersionCreated

  • versionintegerالزامی
  • bundle_hashstring | null

    sha256, hex

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

  • manifest_hashstring | null

    sha256, hex

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

  • filesinteger
  • spaboolean
  • runtime_datestring
  • varsstring[]
  • bindingsstring[]
  • created_atstring (date-time)الزامی

خطاها

وضعیتتوضیح
400Bad request: bad_bundle, bad_bindings, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: missing_assets, rotate_storage_key
413Body too large: too_large, limit_exceeded (over the plan's deployment limits, GET /v1/limits)
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/versions" \
  -H "Authorization: Bearer $KEY" \
  -d '{"main_module":"…","modules":{},"runtime_date":"2026-11-04","vars":{},"bindings":{},"files":{},"headers_file":"…","redirects_file":"…","spa":true}'
POST/v1/functions/{name}/deploy

Deploy a version (production or a preview)#

A branch other than main, master or production deploys the preview <branch>--<name>.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

  • versioninteger

    default: the newest

  • branchstring

    git branch; default production

پاسخ

200Deployed

  • namestringالزامی
  • urlstringالزامی
  • branchstring | null

    preview label; null for production

  • active_versionintegerالزامی
  • snapshotinteger | nullالزامی

    configuration revision; null when superseded

  • supersededboolean

    only when true: a newer version is already live at that address, so this deploy changed nothing (concurrent deploys: the newest wins)

  • database_branchesDatabaseBranchRef[]

خطاها

وضعیتتوضیح
400Bad request: bad_branch, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found, no_version
409Conflict: binding_gone, too_many_branches, no_main, storage_busy
500internal: an unexpected failure
503Unavailable: storage_unavailable, storage_unreachable

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/deploy" \
  -H "Authorization: Bearer $KEY" \
  -d '{"version":1,"branch":"dev"}'
GET/v1/starters

The starter functions, with their source#

hello, json-api, webhook, cron, database (env.DB) and cache (env.CACHE). Post a starter's files to POST /v1/functions/{name}/source.

دسترسی
کلید API یا نشست داشبورد

پاسخ

200object

  • startersobject[]
    • idstring
    • titlestring
    • main_modulestring
    • filesmap of string
    • bindingsobject[]
    • cronsstring[]

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential

نمونه

curl "https://api.ibel.ai/v1/starters" \
  -H "Authorization: Bearer $KEY"
GET/v1/source/limits

The plan's limits on function source and uploaded archives#

دسترسی
کلید API یا نشست داشبورد

پاسخ

200object

  • planstring
  • functionobject
  • uploadobject

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential

نمونه

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

Deployment size limits, the plan's and every plan's#

What one deployment may hold, by plan: static files, one file, all static files, the function's code compressed (gzip of the stored code) and before compression. Sizes are bytes. plan, function and upload are as in GET /v1/source/limits; deployment and run (copies of a function per server) are the caller's plan; plans is every plan, contract true where the limits are set by contract. The CLI checks a deployment against this before uploading; a deployment over a limit is refused with 413 limit_exceeded.

دسترسی
کلید API یا نشست داشبورد

پاسخ

200object

  • planstring
  • functionobject
  • uploadobject
  • deploymentDeploymentLimits
  • runobject

    the caller's plan's run limits (D117)

  • plansobject

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential

نمونه

curl "https://api.ibel.ai/v1/limits" \
  -H "Authorization: Bearer $KEY"
GET/v1/git/remote

Where git push goes, and how to sign in#

The username can be anything; the password is an API key (developer role or above).

دسترسی
کلید API یا نشست داشبورد

پاسخ

200object

  • basestring
  • url_templatestring

    e.g. https://git.ibel.ai/{name}.git

  • remotestring
  • usernamestring
  • passwordstring

    one of api_key

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential

نمونه

curl "https://api.ibel.ai/v1/git/remote" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/source

A version's source files (default the live version)#

A version a build or the CLI's bundler made has no plain source (editable false, reason built).

دسترسی
کلید API یا نشست داشبورد

پارامترها

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

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

  • versionintegerکوئری

پاسخ

200object

  • namestring
  • versioninteger
  • liveboolean
  • editableboolean
  • reasonstring | null

    one of built, null

  • main_modulestring | null
  • filesmap of string | null

خطاها

وضعیتتوضیح
400Bad request: bad_param
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found, no_version

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/source" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/source

Deploy a function from source files as written (no bundling)#

Each file is parsed as an ES module first. The version keeps the text (editable). Bindings left out on an existing function keep the live version's.

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

پارامترها

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

    the function's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

  • filesmap of stringالزامی

    file name (.js or .mjs) → text; count and size by plan

  • main_modulestring

    default worker.js, else the first file

  • bindingsobject

    as on POST …/versions

  • varsmap of string
  • runtime_datestring (date)
  • createboolean

    make the function if it does not exist

  • deployboolean

    false: make the version only; default true

پاسخ

201objectCreated

  • namestring
  • createdboolean
  • versioninteger
  • deployedboolean
  • urlstring
  • active_versioninteger | null
  • bundle_hashstring
  • bindingsstring[]
  • varsstring[]
  • created_atstring (date-time)

خطاها

وضعیتتوضیح
400Bad request: bad_files, bad_name, bad_main, syntax_error, bad_bindings, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: name_taken
413Too large: too_large, too_many_files, limit_exceeded (over the plan's deployment limits, GET /v1/limits)

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/source" \
  -H "Authorization: Bearer $KEY" \
  -d '{"files":{"KEY":"s3cr3t"}}'
POST/v1/functions/{name}/rollback

Roll production back#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

  • versioninteger

    default: the version live before the current one

پاسخ

200RolledBack

  • namestringالزامی
  • urlstringالزامی
  • active_versionintegerالزامی
  • snapshotinteger

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/rollback" \
  -H "Authorization: Bearer $KEY" \
  -d '{"version":1}'
GET/v1/functions/{name}/previews

List branch previews#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200object

  • previewsPreview[]الزامی
    • branchstringالزامی
    • urlstringالزامی
    • versionintegerالزامی
    • updated_atstring (date-time)
    • git_branchstring | null

      the git branch the build came from

    • commitstring | null
    • messagestring | null

      the commit's first line

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/previews" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/functions/{name}/previews/{branch}

Delete a preview#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

    the git branch or its label

پاسخ

200PreviewDeleted

  • branchstringالزامی
  • deletedbooleanالزامی
  • database_branchesobject[]

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/previews/dev" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/env

List environment variables#

The project's own and the team's shared ones linked to it. Values are masked unless revealed.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • environmentstringکوئری

    the variables that apply there

    one of production, preview, development

  • branchstringکوئری

    with it: the variables for every preview and that branch's

  • keystringکوئری

    one key

  • decryptstringکوئری

    1: plain values (owner, admin, developer); sensitive ones never

    one of 1

پاسخ

200EnvVarList

  • variablesEnvVar[]الزامی
    • idstring (uuid)الزامی
    • keystringالزامی

      pattern ^[A-Za-z_][A-Za-z0-9_]{0,63}$

    • environmentsstring[]الزامی
    • branchstring | nullالزامی

      a git branch; only with environments [preview]

    • scopestringالزامی

      team: a shared variable

      one of project, team

    • typestringالزامی

      sensitive: never shown again, production and preview only

      one of plain, sensitive

    • valuestring | nullالزامی

      the text only when revealed (?decrypt=1) and plain

    • created_atstring (date-time)
    • updated_atstring (date-time)
    • created_byobject | null
    • updated_byobject | null
    • projectsobject[]

      shared variables only

  • sharedEnvVar[]

    a project's list: the team's shared variables linked to it

    • idstring (uuid)الزامی
    • keystringالزامی

      pattern ^[A-Za-z_][A-Za-z0-9_]{0,63}$

    • environmentsstring[]الزامی
    • branchstring | nullالزامی

      a git branch; only with environments [preview]

    • scopestringالزامی

      team: a shared variable

      one of project, team

    • typestringالزامی

      sensitive: never shown again, production and preview only

      one of plain, sensitive

    • valuestring | nullالزامی

      the text only when revealed (?decrypt=1) and plain

    • created_atstring (date-time)
    • updated_atstring (date-time)
    • created_byobject | null
    • updated_byobject | null
    • projectsobject[]

      shared variables only

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/env" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/env

Add or import environment variables#

All or none. Applies at once: running deployments restart with the new values.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

one of: {key, value, …}, {variables: [...]}, {dotenv}

  • keystring
  • valuestring

    up to 5120 characters

  • variablesEnvVarInput[]

    several, up to 128

  • dotenvstring

    .env text to import

  • environmentsstring[]

    for every row that leaves them out

  • branchstring

    projects only

  • typestring

    one of plain, sensitive

  • sensitiveboolean
  • upsertboolean

    replace the value of a variable with the same key, branch and environments

  • projectsstring[]

    shared variables only: the apps and functions it reaches

پاسخ

201EnvVarAdded

  • variablesEnvVar[]الزامی
  • createdintegerالزامی
  • updatedintegerالزامی

خطاها

وضعیتتوضیح
400Bad request: bad_variable, bad_key, bad_value, bad_environments, bad_type, bad_branch, sensitive_development, policy_sensitive, bad_dotenv, duplicate, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: env_conflict, sensitive, too_many
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/env" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","value":"s3cr3t","variables":[{"key":"STRIPE_KEY","value":"s3cr3t","environments":["production"],"branch":"dev","type":"plain","sensitive":true}],"dotenv":"…","environments":["production"],"branch":"dev","type":"plain","sensitive":true,"upsert":true,"projects":["…"]}'
GET/v1/functions/{name}/env/{id}

One environment variable#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    the variable's id

  • decryptstringکوئری

    1: plain values (owner, admin, developer); sensitive ones never

    one of 1

پاسخ

200EnvVar

  • idstring (uuid)الزامی
  • keystringالزامی

    pattern ^[A-Za-z_][A-Za-z0-9_]{0,63}$

  • environmentsstring[]الزامی
  • branchstring | nullالزامی

    a git branch; only with environments [preview]

  • scopestringالزامی

    team: a shared variable

    one of project, team

  • typestringالزامی

    sensitive: never shown again, production and preview only

    one of plain, sensitive

  • valuestring | nullالزامی

    the text only when revealed (?decrypt=1) and plain

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_byobject | null
  • updated_byobject | null
  • projectsobject[]

    shared variables only

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/env/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/functions/{name}/env/{id}

Delete an environment variable#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    the variable's id

پاسخ

200object

  • idstring (uuid)
  • keystring
  • deletedboolean

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/env/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/functions/{name}/env/{id}

Change an environment variable#

A sensitive variable cannot become plain.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    the variable's id

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

  • keystring
  • valuestring

    up to 5120 characters

  • environmentsstring[]
  • branchstring | null
  • typestring

    one of plain, sensitive

  • sensitiveboolean
  • projectsstring[]

    shared variables only: replaces the links

پاسخ

200EnvVar

  • idstring (uuid)الزامی
  • keystringالزامی

    pattern ^[A-Za-z_][A-Za-z0-9_]{0,63}$

  • environmentsstring[]الزامی
  • branchstring | nullالزامی

    a git branch; only with environments [preview]

  • scopestringالزامی

    team: a shared variable

    one of project, team

  • typestringالزامی

    sensitive: never shown again, production and preview only

    one of plain, sensitive

  • valuestring | nullالزامی

    the text only when revealed (?decrypt=1) and plain

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_byobject | null
  • updated_byobject | null
  • projectsobject[]

    shared variables only

خطاها

وضعیتتوضیح
400Bad request: bad_variable, bad_key, bad_value, bad_environments, bad_type, bad_branch, sensitive_development, policy_sensitive, bad_dotenv, duplicate, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: env_conflict, sensitive, too_many
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/functions/my-api/env/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","value":"s3cr3t","environments":["production"],"branch":"dev","type":"plain","sensitive":true,"projects":["…"]}'
PUT/v1/functions/{name}/secrets/{key}

Set a secret (a sensitive variable for production and preview)#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

    secret name

    pattern ^[A-Z_][A-Z0-9_]{0,63}$

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

  • valuestringالزامی

    up to 5120 characters

پاسخ

200object

  • namestring
  • updatedboolean

خطاها

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

نمونه

curl -X PUT "https://api.ibel.ai/v1/functions/my-api/secrets/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY" \
  -d '{"value":"s3cr3t"}'
DELETE/v1/functions/{name}/secrets/{key}

Delete a key in every environment#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

    secret name

پاسخ

200object

  • namestring
  • deletedboolean

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/secrets/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/secrets

List the variables' keys#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200object

  • secretsSecret[]الزامی
    • namestringالزامی
    • updated_atstring (date-time)

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/secrets" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/crons

List cron triggers#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200object

  • cronsCron[]الزامی
    • exprstringالزامی

      5-field cron

    • tzstringالزامی

      IANA time zone

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/crons" \
  -H "Authorization: Bearer $KEY"
PUT/v1/functions/{name}/crons

Replace the cron triggers#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

  • crons(string | object)[]الزامی

    up to 5

    • exprstringالزامی
    • tzstring
  • tzstring

    default "Asia/Tehran"

پاسخ

200object

  • cronsCron[]الزامی
    • exprstringالزامی

      5-field cron

    • tzstringالزامی

      IANA time zone

خطاها

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

نمونه

curl -X PUT "https://api.ibel.ai/v1/functions/my-api/crons" \
  -H "Authorization: Bearer $KEY" \
  -d '{"crons":["0 3 * * *"]}'
GET/v1/functions/{name}/logs

Log entries, filtered and paged#

The newest limit entries that match, newest last; next_cursor reaches older ones. The store keeps about the last 2000 per project.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • sincestringکوئری

    ISO time, epoch ms, or back from now: 30m, 1h, 7d

  • untilstringکوئری

    ISO time or epoch ms

  • levelstringکوئری

    error, warning, info (comma list)

  • sourcestringکوئری

    request, static, fetch, cron, console (comma list)

  • statusstringکوئری

    codes or classes, e.g. 404,5xx

  • pathstringکوئری

    request paths (comma list); end with * for a prefix

  • environmentstringکوئری

    production or preview

  • branchstringکوئری

    a preview's branch

  • deploymentstringکوئری

    a version number, e.g. 12 or v12

  • qstringکوئری

    text the entry contains

  • limitintegerکوئری

    1-1000, default 100

    1–1000 · default 100

  • cursorstringکوئری

    next_cursor of the page before

  • facetsstringکوئری

    1: counts per filter value

  • bucketsintegerکوئری

    a histogram of the range in this many bars (up to 120)

    0–120

پاسخ

200LogPage

  • logsLogEntry[]الزامی

    newest last

  • next_cursorstring | nullالزامی

    pass as cursor for older entries

  • matchedintegerالزامی

    entries in the range that match

  • scannedintegerالزامی
  • truncatedboolean

    the team's request read only part of its logs

  • facetsobject

    with facets=1: counts per filter value, each over what the other filters leave

  • histogramobject

    with buckets=n: the range in n bars, per level

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/logs" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/tail

Follow the log (server-sent events)#

Each event is data: <LogEntry JSON>; : keep-alive comments about every 10 s.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200stringtext/event-stream

خطاها

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

نمونه

درخواست
curl -N "https://api.ibel.ai/v1/functions/my-api/tail" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/usage

Usage per minute#

At most 31 days per request.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • fromstring (date-time)کوئری

    ISO time; default an hour before to

  • tostring (date-time)کوئری

    ISO time; default now

پاسخ

200UsageReport

  • fromstring (date-time)الزامی
  • tostring (date-time)الزامی
  • totalUsageالزامی
  • seriesUsage[]الزامی

خطاها

وضعیتتوضیح
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/functions/my-api/usage" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/observability

Requests, errors and latency#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • rangestringکوئری

    1h (1-minute steps), 24h (15 minutes) or 7d (2 hours); any other value is 400 bad_range

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

پاسخ

200Observability

  • rangestringالزامی
  • stepstringالزامی
  • totalsPercentilesالزامی
  • seriesPercentiles[]الزامی
  • routesPercentiles[]الزامی
  • notestring
  • copiesFunctionCopies

خطاها

وضعیتتوضیح
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/functions/my-api/observability" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/builds

List builds (newest 50)#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200object

  • buildsBuild[]الزامی
    • idstring (uuid)الزامی
    • branchstring | null
    • commitstring | null

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

    • messagestring | null

      the commit's first line

    • statusstringالزامی

      one of queued, running, succeeded, failed, cancelled, skipped

    • triggerstringالزامی

      one of cli, git

    • versioninteger | null
    • errorstring | null
    • created_atstring (date-time)الزامی
    • started_atstring (date-time) | null
    • finished_atstring (date-time) | null
    • secondsinteger | null
    • stagedboolean

      a production build held for its checks

    • promotionstring

      one of none, waiting, promoted, blocked, superseded

    • scanobject | null

      the dependency scan's summary

    • queueobject | null

      a queued build's place in the team's queue

    • configBuildConfig | null

      the build configuration frozen when the build started

    • no_cacheboolean

      built without the build cache

    • cacheobject | null
    • hintobject | null

      a failed build explained; show it above the log

    • secretsobject | null

      the secret scan's summary

    • sbomobject | null
    • provenanceobject | null
    • skip_reasonstring | null
    • cancelled_bystring | null

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/builds" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/builds

Queue a build from a source tarball#

The body is a .tar.gz of the project, up to 100 MiB.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • branchstringکوئری

    git branch; none, main, master or production builds production

  • commitstringکوئری

    40-hex git SHA

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

  • no_cachestringکوئری

    1: build without the build cache

    one of 1, true

  • triggerstringکوئری

    git counts only from the Git receiver (its own token); otherwise the build is cli

    one of cli, git

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

string (binary)

پاسخ

201Build

  • idstring (uuid)الزامی
  • branchstring | null
  • commitstring | null

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

  • messagestring | null

    the commit's first line

  • statusstringالزامی

    one of queued, running, succeeded, failed, cancelled, skipped

  • triggerstringالزامی

    one of cli, git

  • versioninteger | null
  • errorstring | null
  • created_atstring (date-time)الزامی
  • started_atstring (date-time) | null
  • finished_atstring (date-time) | null
  • secondsinteger | null
  • stagedboolean

    a production build held for its checks

  • promotionstring

    one of none, waiting, promoted, blocked, superseded

  • scanobject | null

    the dependency scan's summary

  • queueobject | null

    a queued build's place in the team's queue

  • configBuildConfig | null

    the build configuration frozen when the build started

  • no_cacheboolean

    built without the build cache

  • cacheobject | null
  • hintobject | null

    a failed build explained; show it above the log

  • secretsobject | null

    the secret scan's summary

  • sbomobject | null
  • provenanceobject | null
  • skip_reasonstring | null
  • cancelled_bystring | null

خطاها

وضعیتتوضیح
400Bad request: bad_source, bad_commit
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
413Body too large: too_large
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/builds" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/gzip" --data-binary @source.tar.gz
GET/v1/functions/{name}/builds/{id}

Get a build#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    build id

پاسخ

200Build

  • idstring (uuid)الزامی
  • branchstring | null
  • commitstring | null

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

  • messagestring | null

    the commit's first line

  • statusstringالزامی

    one of queued, running, succeeded, failed, cancelled, skipped

  • triggerstringالزامی

    one of cli, git

  • versioninteger | null
  • errorstring | null
  • created_atstring (date-time)الزامی
  • started_atstring (date-time) | null
  • finished_atstring (date-time) | null
  • secondsinteger | null
  • stagedboolean

    a production build held for its checks

  • promotionstring

    one of none, waiting, promoted, blocked, superseded

  • scanobject | null

    the dependency scan's summary

  • queueobject | null

    a queued build's place in the team's queue

  • configBuildConfig | null

    the build configuration frozen when the build started

  • no_cacheboolean

    built without the build cache

  • cacheobject | null
  • hintobject | null

    a failed build explained; show it above the log

  • secretsobject | null

    the secret scan's summary

  • sbomobject | null
  • provenanceobject | null
  • skip_reasonstring | null
  • cancelled_bystring | null

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/builds/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/builds/{id}/logs

A build's log#

1000 lines per call. Each step starts with a line ── <step> (unpack, install, build and deploy).

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    build id

  • afterstringکوئری

    the last line id received, <ms>-<n>

پاسخ

200BuildLog

  • statusstringالزامی
  • linesobject[]الزامی
  • last_idstring

    the last entry read, shown or not: the next after

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/builds/88e2fe1d-6d75-4de5-8c8f-27380ec66903/logs" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/builds/{id}/cancel

Cancel a build#

A queued or running build; a running one stops and deploys nothing.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    build id

پاسخ

200object

  • idstring (uuid)الزامی
  • statusstringالزامی

    one of cancelled

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
409Conflict: not_running (the build already finished)
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/builds/88e2fe1d-6d75-4de5-8c8f-27380ec66903/cancel" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/builds/{id}/redeploy

Build the same source again#

The same source or commit as the build, with today's build configuration.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    build id

  • no_cachestringکوئری

    1: build without the build cache

    one of 1, true

پاسخ

201object

  • idstring (uuid)الزامی
  • statusstringالزامی

    one of queued

  • no_cachebooleanالزامی

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/builds/88e2fe1d-6d75-4de5-8c8f-27380ec66903/redeploy" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/builds/{id}/secrets

A build's secret findings#

Where the secret scan found likely secrets (never the values).

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    build id

پاسخ

200SecretFindings

  • summaryobject | nullالزامی
    • scannedboolean
    • countinteger
    • highinteger
    • blockedboolean
    • policystring
  • findingsobject[]الزامی
    • rulestring
    • descriptionstring
    • filestring
    • lineinteger
    • confidencestring

      one of high, low

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/builds/88e2fe1d-6d75-4de5-8c8f-27380ec66903/secrets" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/builds/{id}/sbom

A build's bill of materials#

The CycloneDX 1.5 document made from the build's lock file.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    build id

  • downloadstringکوئری

    1: as a file (content-disposition)

    one of 1

پاسخ

200objectapplication/vnd.cyclonedx+json

خطاها

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

نمونه

درخواست
curl "https://api.ibel.ai/v1/functions/my-api/builds/88e2fe1d-6d75-4de5-8c8f-27380ec66903/sbom" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/builds/{id}/provenance

A build's provenance record#

Only a build that deployed has one.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstring (uuid)مسیرالزامی

    build id

پاسخ

200ProvenanceRecord

  • statementProvenanceStatementالزامی
  • signaturestringالزامی

    base64

  • algorithmstringالزامی

    one of ed25519

  • key_idstringالزامی

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/builds/88e2fe1d-6d75-4de5-8c8f-27380ec66903/provenance" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/build-config

Get the build configuration#

How the project is built, the Node.js versions offered, the plan's limits and the build cache.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200BuildConfigView

  • settingsBuildConfigالزامی
  • node_versionsstring[]الزامی
  • default_node_versionstringالزامی
  • limitsobjectالزامی
  • cacheBuildCacheالزامی

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/build-config" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/functions/{name}/build-config

Change the build configuration#

Only the fields sent change; null or an empty string puts a field back to its default. The next build uses them.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

any of the fields; null or an empty string clears one

  • root_dirstring | null

    up to 200 characters

  • ignore_commandstring | null

    up to 500 characters

  • install_commandstring | null

    up to 500 characters

  • build_commandstring | null

    up to 500 characters

  • output_dirstring | null

    up to 200 characters

  • node_versionstring | null

    one of 22, 24, 26, null

  • secret_scanstring

    one of block, warn

  • cacheboolean

پاسخ

200object

  • settingsBuildConfigالزامی
    • root_dirstringالزامی

      a folder in the repository; empty: the root

    • ignore_commandstringالزامی

      exit 0 skips the build; empty: never skip

    • install_commandstringالزامی

      empty: detected

    • build_commandstringالزامی

      empty: detected

    • output_dirstringالزامی

      empty: detected

    • node_versionstring | nullالزامی

      null: the default (26)

      one of 22, 24, 26, null

    • secret_scanstringالزامی

      one of block, warn

    • cachebooleanالزامی

خطاها

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

نمونه

curl -X PATCH "https://api.ibel.ai/v1/functions/my-api/build-config" \
  -H "Authorization: Bearer $KEY" \
  -d '{"root_dir":"…","ignore_command":"…","install_command":"…","build_command":"…","output_dir":"…","node_version":"22","secret_scan":"block","cache":true}'
GET/v1/functions/{name}/build-cache

The build cache#

What the project's build cache holds; the oldest entries go first when it is over the plan's size.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200BuildCache

  • entriesobject[]الزامی
  • bytesintegerالزامی
  • limit_bytesintegerالزامی

    the plan's size: Hobby 500 MB, Pro 1 GB, Enterprise 2 GB

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/build-cache" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/functions/{name}/build-cache

Clear the build cache#

The next build starts fresh.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200object

  • clearedintegerالزامی

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/build-cache" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/transfer

Move to another team#

Refused while any version binds a database, cache or bucket.

دسترسی
فقط نشست داشبورد (کلید API پذیرفته نمی‌شود)
نقش‌ها
admin or owner in both teams
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

  • teamstring (uuid)الزامی

پاسخ

200object

  • movedstring
  • tostring

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/transfer" \
  -H "Authorization: Bearer $SESSION" \
  -d '{"team":"8c1e0c55-1f2a-4d3b-9e8f-0a1b2c3d4e5f"}'
GET/v1/functions/{name}/domains

List the project's custom domains#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200object

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

      lowercase ASCII (an international name in its xn-- form)

    • apexstringالزامی

      the registrable domain

    • typestringالزامی

      one of apex, subdomain

    • projectobjectالزامی
    • branchstring | null

      a git branch: the domain serves its preview

    • servesstring | null

      the platform address it serves; null for a redirect

    • redirectobject | null
    • statestringالزامی

      one of pending, verifying, valid, misconfigured, error

    • reasonstring | null

      what is missing or wrong, for people

    • verifiedbooleanالزامی

      ownership proven by the TXT record

    • recordsDomainRecord[]الزامی

      the records to set at the DNS provider

    • checksobject[]

      what the last lookup found

    • certificateobjectالزامی
    • urlstringالزامی
    • checked_atstring (date-time) | null
    • next_check_atstring (date-time)
    • created_atstring (date-time)
    • alsoDomain[]

      add only: the www pair added with it

  • limitinteger

    domains per project on the team's plan

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/domains" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/domains

Add a custom domain#

Records: a subdomain is a CNAME to the platform's target, a registrable domain A records to the gateway addresses; a TXT record on the registrable domain proves ownership (one per team covers every name under it). States: pending, misconfigured, verifying (a certificate is being obtained), valid, error.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

  • domainstringالزامی

    a subdomain (shop.example.ir) or a registrable domain (example.ir)

  • wwwstring

    for a root or www name: also add the other one, redirecting to the root or to www

    one of none, redirect-to-apex, redirect-to-www

  • redirect_tostring

    another domain of the project: answer with a redirect there

  • redirect_statusinteger

    one of 301, 302, 307, 308 · default 308

  • branchstring

    a git branch: serve its preview instead of production

پاسخ

201Domain

  • namestringالزامی

    lowercase ASCII (an international name in its xn-- form)

  • apexstringالزامی

    the registrable domain

  • typestringالزامی

    one of apex, subdomain

  • projectobjectالزامی
  • branchstring | null

    a git branch: the domain serves its preview

  • servesstring | null

    the platform address it serves; null for a redirect

  • redirectobject | null
  • statestringالزامی

    one of pending, verifying, valid, misconfigured, error

  • reasonstring | null

    what is missing or wrong, for people

  • verifiedbooleanالزامی

    ownership proven by the TXT record

  • recordsDomainRecord[]الزامی

    the records to set at the DNS provider

  • checksobject[]

    what the last lookup found

  • certificateobjectالزامی
  • urlstringالزامی
  • checked_atstring (date-time) | null
  • next_check_atstring (date-time)
  • created_atstring (date-time)
  • alsoDomain[]

    add only: the www pair added with it

خطاها

وضعیتتوضیح
400Bad request: bad_domain, reserved_domain, bad_redirect, bad_branch, bad_www, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, domain_limit
404Not found: not_found
409Conflict: domain_exists, domain_taken
429Too many requests: rate_limited
500internal: an unexpected failure

نمونه

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

One custom domain#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

    the domain, e.g. shop.example.ir

پاسخ

200Domain

  • namestringالزامی

    lowercase ASCII (an international name in its xn-- form)

  • apexstringالزامی

    the registrable domain

  • typestringالزامی

    one of apex, subdomain

  • projectobjectالزامی
  • branchstring | null

    a git branch: the domain serves its preview

  • servesstring | null

    the platform address it serves; null for a redirect

  • redirectobject | null
  • statestringالزامی

    one of pending, verifying, valid, misconfigured, error

  • reasonstring | null

    what is missing or wrong, for people

  • verifiedbooleanالزامی

    ownership proven by the TXT record

  • recordsDomainRecord[]الزامی

    the records to set at the DNS provider

  • checksobject[]

    what the last lookup found

  • certificateobjectالزامی
  • urlstringالزامی
  • checked_atstring (date-time) | null
  • next_check_atstring (date-time)
  • created_atstring (date-time)
  • alsoDomain[]

    add only: the www pair added with it

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/domains/domain" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/functions/{name}/domains/ibel.ai

Remove a custom domain#

Stops serving it and deletes its certificate; domains redirecting to it stop redirecting.

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

    the domain, e.g. shop.example.ir

پاسخ

200object

  • namestring
  • removedboolean

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/domains/domain" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/functions/{name}/domains/ibel.ai

Change a domain's redirect or branch#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

    the domain, e.g. shop.example.ir

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

  • redirect_tostring | null
  • redirect_statusinteger

    one of 301, 302, 307, 308

  • branchstring | null

پاسخ

200Domain

  • namestringالزامی

    lowercase ASCII (an international name in its xn-- form)

  • apexstringالزامی

    the registrable domain

  • typestringالزامی

    one of apex, subdomain

  • projectobjectالزامی
  • branchstring | null

    a git branch: the domain serves its preview

  • servesstring | null

    the platform address it serves; null for a redirect

  • redirectobject | null
  • statestringالزامی

    one of pending, verifying, valid, misconfigured, error

  • reasonstring | null

    what is missing or wrong, for people

  • verifiedbooleanالزامی

    ownership proven by the TXT record

  • recordsDomainRecord[]الزامی

    the records to set at the DNS provider

  • checksobject[]

    what the last lookup found

  • certificateobjectالزامی
  • urlstringالزامی
  • checked_atstring (date-time) | null
  • next_check_atstring (date-time)
  • created_atstring (date-time)
  • alsoDomain[]

    add only: the www pair added with it

خطاها

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

نمونه

curl -X PATCH "https://api.ibel.ai/v1/functions/my-api/domains/domain" \
  -H "Authorization: Bearer $KEY" \
  -d '{"redirect_to":"…","redirect_status":301,"branch":"dev"}'
POST/v1/functions/{name}/domains/ibel.ai/verify

Check a domain's DNS now#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

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

    the domain, e.g. shop.example.ir

پاسخ

200Domain

  • namestringالزامی

    lowercase ASCII (an international name in its xn-- form)

  • apexstringالزامی

    the registrable domain

  • typestringالزامی

    one of apex, subdomain

  • projectobjectالزامی
  • branchstring | null

    a git branch: the domain serves its preview

  • servesstring | null

    the platform address it serves; null for a redirect

  • redirectobject | null
  • statestringالزامی

    one of pending, verifying, valid, misconfigured, error

  • reasonstring | null

    what is missing or wrong, for people

  • verifiedbooleanالزامی

    ownership proven by the TXT record

  • recordsDomainRecord[]الزامی

    the records to set at the DNS provider

  • checksobject[]

    what the last lookup found

  • certificateobjectالزامی
  • urlstringالزامی
  • checked_atstring (date-time) | null
  • next_check_atstring (date-time)
  • created_atstring (date-time)
  • alsoDomain[]

    add only: the www pair added with it

خطاها

وضعیتتوضیح
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/functions/my-api/domains/domain/verify" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/build-settings

Get build settings#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

پاسخ

200BuildSettings

  • smokeboolean
  • smoke_pathstring
  • test_commandstring | null
  • typecheckboolean
  • typecheck_commandstring | null
  • required_checksstring[]
  • check_timeout_minutesinteger
  • scan_fail_onstring

    one of none, high, critical

  • planstring
  • appliesobject

    the same settings as the team's plan allows them today

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/build-settings" \
  -H "Authorization: Bearer $KEY"
PUT/v1/functions/{name}/build-settings

Change build settings#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

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

only the fields sent change

  • smokeboolean
  • smoke_pathstring

    up to 200 characters

  • test_commandstring | null

    up to 300 characters

  • typecheckboolean
  • typecheck_commandstring | null

    up to 300 characters

  • required_checksstring[]

    0–10 items

  • check_timeout_minutesinteger

    1–60

  • scan_fail_onstring

    one of none, high, critical

پاسخ

200BuildSettings

  • smokeboolean
  • smoke_pathstring
  • test_commandstring | null
  • typecheckboolean
  • typecheck_commandstring | null
  • required_checksstring[]
  • check_timeout_minutesinteger
  • scan_fail_onstring

    one of none, high, critical

  • planstring
  • appliesobject

    the same settings as the team's plan allows them today

خطاها

وضعیتتوضیح
400Bad request: bad_settings, bad_name, bad_status, bad_url
401unauthorized: missing, invalid, expired or revoked credential
403Forbidden: forbidden, plan_required
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/functions/my-api/build-settings" \
  -H "Authorization: Bearer $KEY" \
  -d '{"smoke":true,"smoke_path":"…","test_command":"…","typecheck":true,"typecheck_command":"…","required_checks":["…"],"check_timeout_minutes":1,"scan_fail_on":"none"}'
GET/v1/functions/{name}/deployments/{build}/checks

A deployment's checks#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

  • buildstring (uuid)مسیرالزامی

    the build's id (a deployment)

پاسخ

200DeploymentChecks

  • buildstring (uuid)
  • promotionstring

    one of none, waiting, promoted, blocked, superseded

  • stagedboolean
  • versioninteger | null
  • deadlinestring (date-time) | null
  • checksCheck[]

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/deployments/build/checks" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/deployments/{build}/checks/{check}

One check, with its log#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

  • buildstring (uuid)مسیرالزامی

    the build's id (a deployment)

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

    the check's name; a '/' in it is sent as %2F

    pattern ^[a-z0-9][a-z0-9._/-]{0,63}$

پاسخ

200Check

  • namestringالزامی
  • sourcestringالزامی

    one of builtin, external

  • statusstringالزامی

    one of pending, queued, running, passed, failed, timed_out

  • requiredboolean
  • summarystring | null
  • urlstring | null
  • attemptinteger
  • started_atstring (date-time) | null
  • finished_atstring (date-time) | null
  • secondsinteger | null
  • logstring

    the end of its output; only on the single-check route

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/deployments/build/checks/check" \
  -H "Authorization: Bearer $KEY"
PUT/v1/functions/{name}/deployments/{build}/checks/{check}

Report an external check (a CI)#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

  • buildstring (uuid)مسیرالزامی

    the build's id (a deployment)

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

    the check's name; a '/' in it is sent as %2F

    pattern ^[a-z0-9][a-z0-9._/-]{0,63}$

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

  • statusstringالزامی

    one of running, passed, failed

  • summarystring

    up to 300 characters

  • urlstring

    up to 500 characters

  • logstring

    up to 65536 characters

پاسخ

200Check

  • namestringالزامی
  • sourcestringالزامی

    one of builtin, external

  • statusstringالزامی

    one of pending, queued, running, passed, failed, timed_out

  • requiredboolean
  • summarystring | null
  • urlstring | null
  • attemptinteger
  • started_atstring (date-time) | null
  • finished_atstring (date-time) | null
  • secondsinteger | null
  • logstring

    the end of its output; only on the single-check route

خطاها

وضعیتتوضیح
400Bad request: bad_settings, bad_name, bad_status, bad_url
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
409Conflict: running, decided, not_waiting, superseded, too_many_checks, reserved_name
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/functions/my-api/deployments/build/checks/check" \
  -H "Authorization: Bearer $KEY" \
  -d '{"status":"running"}'
POST/v1/functions/{name}/deployments/{build}/checks/{check}/rerun

Run a check again#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

  • buildstring (uuid)مسیرالزامی

    the build's id (a deployment)

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

    the check's name; a '/' in it is sent as %2F

    pattern ^[a-z0-9][a-z0-9._/-]{0,63}$

پاسخ

200object

  • rerunstring

    one of smoke, pending, build

  • buildstring (uuid)

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
409Conflict: running, decided, not_waiting, superseded, too_many_checks, reserved_name
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/deployments/build/checks/check/rerun" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/deployments/{build}/promote

Make a deployment waiting on its checks live#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

  • buildstring (uuid)مسیرالزامی

    the build's id (a deployment)

پاسخ

200object

  • buildstring (uuid)
  • promotionstring
  • versioninteger

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Forbidden: forbidden, plan_required
404Not found: not_found
409Conflict: running, decided, not_waiting, superseded, too_many_checks, reserved_name
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/deployments/build/promote" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/deployments/{build}/vulnerabilities

Vulnerable dependencies of a build#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

  • buildstring (uuid)مسیرالزامی

    the build's id (a deployment)

پاسخ

200Vulnerabilities

  • buildstring (uuid)
  • scanobject
  • vulnerabilitiesVulnerability[]

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/deployments/build/vulnerabilities" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/deployments/{build}/vulnerabilities/rescan

Scan a build's dependencies again#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

  • buildstring (uuid)مسیرالزامی

    the build's id (a deployment)

پاسخ

200Vulnerabilities

  • buildstring (uuid)
  • scanobject
  • vulnerabilitiesVulnerability[]

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
409Conflict: running, decided, not_waiting, superseded, too_many_checks, reserved_name
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/deployments/build/vulnerabilities/rescan" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/vulnerabilities

The project's dependency summary#

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

پارامترها

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

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

پاسخ

200object

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/vulnerabilities" \
  -H "Authorization: Bearer $KEY"
GET/v1/provenance/key

The platform's provenance key#

The Ed25519 public key that signs build provenance records.

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

پاسخ

200object

  • algorithmstringالزامی

    one of ed25519

  • key_idstringالزامی
  • public_keystringالزامی

    PEM

خطاها

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

نمونه

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

Check a provenance record#

Checks the signature with the platform's key, and whether the record is the one held for that build.

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

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

  • statementProvenanceStatementالزامی
  • signaturestringالزامی

    base64

  • algorithmstringالزامی

    one of ed25519

  • key_idstringالزامی

پاسخ

200object

  • validbooleanالزامی
  • reasonstring
  • issued_by_usbooleanالزامی
  • statementProvenanceStatement

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/provenance/verify" \
  -H "Authorization: Bearer $KEY" \
  -d '{"statement":{"type":"cloudhost.build-provenance/v1","subject":{"kind":"…","name":"my-api","output_sha256":"…","bundle_sha256":"…","manifest_sha256":"…","version":1},"build":{"id":"88e2fe1d-6d75-4de5-8c8f-27380ec66903","trigger":"…","branch":"dev","commit":"3f786850e387550fdab836ed7e6dc881de23001b","source_sha256":"…","lock_file":"…","lock_file_sha256":"…","sbom_sha256":"…","started_at":"…","finished_at":"…"},"builder":{"name":"my-api","isolation":"…","cache":"…"},"issued_at":"2026-11-04T09:30:00Z"},"signature":"…","algorithm":"ed25519","key_id":"…"}'