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

فیچر فلگ‌ها

فلگ برای هر پروژه با مقدار هر محیط و شاخه، قانون‌های هدف‌گیری، انتشار تدریجی، کلید قطع اضطراری و تاریخچه با بازگشت.

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

List flags#

The project's flags with a summary per environment (on or killed, the default value, rule count, rollout percentage) and the plan's limits.

دسترسی
کلید 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

پاسخ

200FlagList

  • flagsFlagListItem[]
    • keystring
    • typestring

      one of boolean, string, number, json

    • descriptionstring
    • created_atstring (date-time)
    • updated_atstring (date-time)
    • created_bystring | null
    • updated_bystring | null
    • environmentsobject
    • branchesinteger

      preview-branch overrides

  • limitsFlagLimits
    • planstring
    • flagsinteger

      Hobby 10, Pro 500, Enterprise 5000

    • flags_usedinteger
    • rules_per_configinteger
    • branch_overridesinteger
    • read_tokensinteger
    • read_requests_per_secondinteger

خطاها

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

نمونه

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

Create a flag#

Create a flag: key, type (boolean, string, number or json), optional description, and value (the default for every environment), config (a whole config for every environment) or environments (a config per environment). The plan caps the number of flags 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

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

  • keystringالزامی

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

  • typestringالزامی

    one of boolean, string, number, json

  • descriptionstring

    up to 500 characters

  • valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • configFlagConfig
  • environmentsobject

پاسخ

201Flag

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

وضعیتتوضیح
400flag_bad_key, flag_bad_type, flag_bad_value, flag_bad_rule, flag_bad_rollout, flag_bad_config
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_exists, flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/flags" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","type":"boolean"}'
GET/v1/functions/{name}/flags/{key}

One flag#

The whole flag: the config of every environment and its preview-branch overrides, and its history version. ?branch= adds that branch's label and override.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

  • branchstringکوئری

    a git branch: adds branch and branch_config

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

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

Delete a flag#

Delete a flag. Its history stays, so a rollback can bring it back. Code that reads it gets its own default.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

پاسخ

200object

  • keystring
  • deletedboolean
  • versioninteger

خطاها

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

نمونه

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

Change a flag's description#

Body {description}. Recorded in the history.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • descriptionstringالزامی

    up to 500 characters

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

curl -X PATCH "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY" \
  -d '{"description":"…"}'
PUT/v1/functions/{name}/flags/{key}/environments/{env}

Replace one environment's config#

The body is the whole config (see FlagConfig); fields left out go back to their defaults (enabled, the type's zero value, no rules, no rollout). Takes effect on running deployments within seconds, without a restart, except for development, which no deployment reads (it is read over the REST path with a development token).

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

    the environment

    one of production, preview, development

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

One environment's (or branch's) config. Evaluation order: enabled: false serves off_value (the kill switch); otherwise the first rule whose conditions all match (and, with a percentage, whose bucket falls inside it); then the rollout; then value.

  • enabledboolean

    false is the kill switch

    default true

  • valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • off_valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • rulesFlagRule[]

    checked in order; at most 5 on Hobby, 50 on Pro

  • rolloutFlagRollout | null

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

وضعیتتوضیح
400flag_bad_environment, flag_bad_value, flag_bad_rule, flag_bad_rollout, flag_bad_percentage, flag_bad_config
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_limit (too many rules for the plan)
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/environments/env" \
  -H "Authorization: Bearer $KEY" \
  -d '{"enabled":true,"value":null,"off_value":null,"rules":[{"id":"88e2fe1d-6d75-4de5-8c8f-27380ec66903","name":"my-api","clauses":[{"attribute":"…","op":"equals","values":[null]}],"value":null,"percentage":0}],"rollout":{"bucket_by":"…","salt":"…","variants":[{"value":null,"percentage":0}]}}'
PUT/v1/functions/{name}/flags/{key}/branches/{branch}

Give one preview branch its own config#

A preview of that branch uses this config as a whole instead of the preview environment's. Body: a FlagConfig.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

    a git branch name (its preview label is what is stored)

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

One environment's (or branch's) config. Evaluation order: enabled: false serves off_value (the kill switch); otherwise the first rule whose conditions all match (and, with a percentage, whose bucket falls inside it); then the rollout; then value.

  • enabledboolean

    false is the kill switch

    default true

  • valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • off_valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • rulesFlagRule[]

    checked in order; at most 5 on Hobby, 50 on Pro

  • rolloutFlagRollout | null

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

وضعیتتوضیح
400flag_bad_branch, flag_bad_value, flag_bad_rule
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_limit
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/branches/dev" \
  -H "Authorization: Bearer $KEY" \
  -d '{"enabled":true,"value":null,"off_value":null,"rules":[{"id":"88e2fe1d-6d75-4de5-8c8f-27380ec66903","name":"my-api","clauses":[{"attribute":"…","op":"equals","values":[null]}],"value":null,"percentage":0}],"rollout":{"bucket_by":"…","salt":"…","variants":[{"value":null,"percentage":0}]}}'
DELETE/v1/functions/{name}/flags/{key}/branches/{branch}

Remove a branch's own config#

The branch's previews follow the preview environment again.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

    a git branch name (its preview label is what is stored)

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/branches/dev" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/flags/{key}/kill

Kill switch#

Turn the flag off in one environment or all: its off_value is served and rules and rollouts are ignored. preview includes every branch override. Reverse with revive. Recorded in the history.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • environmentstring

    one of production, preview, development, all · default "all"

  • branchstring

    a preview branch (with environment preview or all)

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/kill" \
  -H "Authorization: Bearer $KEY" \
  -d '{"environment":"all","branch":"dev"}'
POST/v1/functions/{name}/flags/{key}/revive

Turn a killed flag back on#

The same body as kill.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • environmentstring

    one of production, preview, development, all · default "all"

  • branchstring

    a preview branch (with environment preview or all)

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/revive" \
  -H "Authorization: Bearer $KEY" \
  -d '{"environment":"all","branch":"dev"}'
GET/v1/functions/{name}/flags/{key}/history

Who changed what#

The flag's history, newest first, kept after the flag is deleted. Each entry: version, action (create, update, kill, revive, rollback, delete), actor (an email or key name), at, changed (the places that differ from the entry before: an environment, branch:<label>, type, description) and the whole state after it.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

  • limitintegerکوئری

    1 to 200 (default 50)

    1–200

  • beforeintegerکوئری

    only versions below this one

پاسخ

200FlagHistory

  • keystring
  • historyobject[]
    • versioninteger
    • actionstring

      one of create, update, kill, revive, rollback, delete

    • atstring (date-time)
    • actorstring | null
    • detailobject
    • changedstring[]
    • restorableboolean
    • stateobject | null

      the whole flag after the change; null for a deletion

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/history" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/flags/{key}/rollback

Roll a flag back#

Restore the whole flag (every environment, branch overrides, description) as it was at a history version. Brings back a deleted flag. Recorded as a new rollback entry; when nothing differs, changed is empty and nothing is recorded.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • versionintegerالزامی

    at least 1

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

وضعیتتوضیح
400flag_bad_version, flag_bad_state (no longer fits today's rules)
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_not_restorable (a deletion entry), flag_limit
500internal: an unexpected failure

نمونه

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

Evaluate a flag for a context#

What a caller would get in an environment (and, for preview, branch), with the reason: off, rule (with the rule id), rollout (with the variant and bucket) or default.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • environmentstring

    one of production, preview, development · default "production"

  • branchstring
  • contextobject

پاسخ

200FlagEvaluation

  • keystring
  • valueanyالزامی

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • reasonstringالزامی

    one of off, rule, rollout, default, missing

  • rulestring
  • variantinteger
  • bucketinteger

    0-9999

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/evaluate" \
  -H "Authorization: Bearer $KEY" \
  -d '{"environment":"production","branch":"dev","context":{}}'
GET/v1/functions/{name}/flag-tokens

List read-only tokens#

Token ids, names, environments and prefixes; never the token itself.

دسترسی
کلید 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

پاسخ

200FlagTokenList

  • tokensFlagToken[]
    • idstring (uuid)
    • namestring
    • environmentstring

      one of production, preview, development

    • prefixstring
    • created_atstring (date-time)
    • created_bystring | null
    • last_used_atstring (date-time) | null
  • maxinteger

خطاها

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

نمونه

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

Create a read-only token#

A token for the REST read path (/v1/flags/read), bound to one environment. The token is in the answer once and never again. The plan caps tokens 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

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

  • environmentstring

    one of production, preview, development · default "production"

  • namestring

    up to 100 characters

پاسخ

201FlagTokenCreated

  • idstring (uuid)
  • tokenstring

    chf_… shown once

  • environmentstring
  • namestring
  • notestring

خطاها

وضعیتتوضیح
400flag_bad_environment, flag_bad_name
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/flag-tokens" \
  -H "Authorization: Bearer $KEY" \
  -d '{"environment":"production","name":"my-api"}'
DELETE/v1/functions/{name}/flag-tokens/{id}

Revoke a read-only token#

The token stops working within five seconds.

دسترسی
کلید 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 token's id

پاسخ

200object

  • idstring
  • revokedboolean

خطاها

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

نمونه

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

List segments#

The project's segments and the plan's cap.

دسترسی
کلید 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

پاسخ

200FlagSegmentList

  • segmentsFlagSegmentSummary[]
    • keystring
    • descriptionstring
    • attributestring
    • includedinteger

      how many users are listed

    • excludedinteger
    • rulesinteger
    • used_bystring[]

      the flags whose rules use it

    • created_atstring
    • updated_atstring
    • updated_bystring
  • limitsobject
    • planstring
    • segmentsinteger

خطاها

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

نمونه

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

Create a segment#

A reusable list of users for flag rules (in_segment).

دسترسی
کلید 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

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

پاسخ

201FlagSegment

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

خطاها

وضعیتتوضیح
400flag_bad_segment
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_exists, flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/segments" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","description":"…","attribute":"…","included":["…"],"excluded":["…"],"rules":[{"clauses":[{}]}]}'
GET/v1/functions/{name}/segments/{key}

One segment#

دسترسی
کلید 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مسیرالزامی

    the segment's key

پاسخ

200FlagSegmentDetail

  • segmentFlagSegment
    • keystring
    • descriptionstring
    • attributestring

      what the lists hold (default: the context's key)

    • includedstring[]
    • excludedstring[]
    • rulesobject[]
  • used_bystring[]

خطاها

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

نمونه

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

Replace a segment#

دسترسی
کلید 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مسیرالزامی

    the segment's key

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

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

پاسخ

200FlagSegment

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

خطاها

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

نمونه

curl -X PUT "https://api.ibel.ai/v1/functions/my-api/segments/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","description":"…","attribute":"…","included":["…"],"excluded":["…"],"rules":[{"clauses":[{}]}]}'
DELETE/v1/functions/{name}/segments/{key}

Delete a segment#

A segment a flag rule uses cannot be deleted.

دسترسی
کلید 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مسیرالزامی

    the segment's key

پاسخ

200Deleted

  • namestring
  • deletedbooleanالزامی

خطاها

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

نمونه

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

Change a segment#

دسترسی
کلید 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مسیرالزامی

    the segment's key

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

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

پاسخ

200FlagSegment

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

خطاها

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

نمونه

curl -X PATCH "https://api.ibel.ai/v1/functions/my-api/segments/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","description":"…","attribute":"…","included":["…"],"excluded":["…"],"rules":[{"clauses":[{}]}]}'
GET/v1/functions/{name}/flag-keys

List flag keys#

Keys for OpenFeature (/ofrep/v1/…): ids, kinds, environments and prefixes; never the key.

دسترسی
کلید 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

پاسخ

200FlagKeyList

  • keysFlagKeyInfo[]
    • idstring
    • namestring
    • kindstring
    • environmentstring
    • prefixstring
    • created_atstring
    • created_bystring

خطاها

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

نمونه

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

Create a flag key#

A server key sees every flag of its environment; a browser key only the flags marked browser. The key is in the answer once.

دسترسی
کلید 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

    up to 100 characters

  • kindstring

    one of server, browser · default "server"

  • environmentstring

    one of production, preview, development · default "production"

پاسخ

201FlagKeyCreated

  • idstring
  • namestring
  • kindstring
  • environmentstring
  • prefixstring
  • created_atstring
  • created_bystring
  • keystring

    chf_… shown once

خطاها

وضعیتتوضیح
400flag_bad_kind, flag_bad_environment, flag_bad_name
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/flag-keys" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","kind":"server","environment":"production"}'
DELETE/v1/functions/{name}/flag-keys/{id}

Revoke a flag key#

The key stops working within five seconds.

دسترسی
کلید 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مسیرالزامی

    the key's id

پاسخ

200Deleted

  • namestring
  • deletedbooleanالزامی

خطاها

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

نمونه

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

Flag audit trail#

Who changed which flag, segment or key, newest first.

دسترسی
کلید 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

  • beforestringکوئری

    an at from the last page

  • limitintegerکوئری

    1-200, default 50

پاسخ

200FlagAudit

  • auditobject[]
    • atstring
    • actorstring
    • actionstring
    • targetstring
    • detailobject

خطاها

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

نمونه

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

Flag requests per day#

دسترسی
کلید 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

  • daysintegerکوئری

    1-90, default 30

پاسخ

200FlagUsage

  • daysobject[]
    • daystring
    • requestsinteger
  • totalinteger

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/flag-usage" \
  -H "Authorization: Bearer $KEY"
GET/v1/apps/{name}/flags

List flags#

The project's flags with a summary per environment (on or killed, the default value, rule count, rollout percentage) and the plan's limits.

دسترسی
کلید 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

پاسخ

200FlagList

  • flagsFlagListItem[]
    • keystring
    • typestring

      one of boolean, string, number, json

    • descriptionstring
    • created_atstring (date-time)
    • updated_atstring (date-time)
    • created_bystring | null
    • updated_bystring | null
    • environmentsobject
    • branchesinteger

      preview-branch overrides

  • limitsFlagLimits
    • planstring
    • flagsinteger

      Hobby 10, Pro 500, Enterprise 5000

    • flags_usedinteger
    • rules_per_configinteger
    • branch_overridesinteger
    • read_tokensinteger
    • read_requests_per_secondinteger

خطاها

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

نمونه

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

Create a flag#

Create a flag: key, type (boolean, string, number or json), optional description, and value (the default for every environment), config (a whole config for every environment) or environments (a config per environment). The plan caps the number of flags 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

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

  • keystringالزامی

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

  • typestringالزامی

    one of boolean, string, number, json

  • descriptionstring

    up to 500 characters

  • valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • configFlagConfig
  • environmentsobject

پاسخ

201Flag

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

وضعیتتوضیح
400flag_bad_key, flag_bad_type, flag_bad_value, flag_bad_rule, flag_bad_rollout, flag_bad_config
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_exists, flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/flags" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","type":"boolean"}'
GET/v1/apps/{name}/flags/{key}

One flag#

The whole flag: the config of every environment and its preview-branch overrides, and its history version. ?branch= adds that branch's label and override.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

  • branchstringکوئری

    a git branch: adds branch and branch_config

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

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

Delete a flag#

Delete a flag. Its history stays, so a rollback can bring it back. Code that reads it gets its own default.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

پاسخ

200object

  • keystring
  • deletedboolean
  • versioninteger

خطاها

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

نمونه

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

Change a flag's description#

Body {description}. Recorded in the history.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • descriptionstringالزامی

    up to 500 characters

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

curl -X PATCH "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY" \
  -d '{"description":"…"}'
PUT/v1/apps/{name}/flags/{key}/environments/{env}

Replace one environment's config#

The body is the whole config (see FlagConfig); fields left out go back to their defaults (enabled, the type's zero value, no rules, no rollout). Takes effect on running deployments within seconds, without a restart, except for development, which no deployment reads (it is read over the REST path with a development token).

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

    the environment

    one of production, preview, development

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

One environment's (or branch's) config. Evaluation order: enabled: false serves off_value (the kill switch); otherwise the first rule whose conditions all match (and, with a percentage, whose bucket falls inside it); then the rollout; then value.

  • enabledboolean

    false is the kill switch

    default true

  • valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • off_valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • rulesFlagRule[]

    checked in order; at most 5 on Hobby, 50 on Pro

  • rolloutFlagRollout | null

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

وضعیتتوضیح
400flag_bad_environment, flag_bad_value, flag_bad_rule, flag_bad_rollout, flag_bad_percentage, flag_bad_config
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_limit (too many rules for the plan)
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/environments/env" \
  -H "Authorization: Bearer $KEY" \
  -d '{"enabled":true,"value":null,"off_value":null,"rules":[{"id":"88e2fe1d-6d75-4de5-8c8f-27380ec66903","name":"my-api","clauses":[{"attribute":"…","op":"equals","values":[null]}],"value":null,"percentage":0}],"rollout":{"bucket_by":"…","salt":"…","variants":[{"value":null,"percentage":0}]}}'
PUT/v1/apps/{name}/flags/{key}/branches/{branch}

Give one preview branch its own config#

A preview of that branch uses this config as a whole instead of the preview environment's. Body: a FlagConfig.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

    a git branch name (its preview label is what is stored)

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

One environment's (or branch's) config. Evaluation order: enabled: false serves off_value (the kill switch); otherwise the first rule whose conditions all match (and, with a percentage, whose bucket falls inside it); then the rollout; then value.

  • enabledboolean

    false is the kill switch

    default true

  • valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • off_valueany

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • rulesFlagRule[]

    checked in order; at most 5 on Hobby, 50 on Pro

  • rolloutFlagRollout | null

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

وضعیتتوضیح
400flag_bad_branch, flag_bad_value, flag_bad_rule
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_limit
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/branches/dev" \
  -H "Authorization: Bearer $KEY" \
  -d '{"enabled":true,"value":null,"off_value":null,"rules":[{"id":"88e2fe1d-6d75-4de5-8c8f-27380ec66903","name":"my-api","clauses":[{"attribute":"…","op":"equals","values":[null]}],"value":null,"percentage":0}],"rollout":{"bucket_by":"…","salt":"…","variants":[{"value":null,"percentage":0}]}}'
DELETE/v1/apps/{name}/flags/{key}/branches/{branch}

Remove a branch's own config#

The branch's previews follow the preview environment again.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

    a git branch name (its preview label is what is stored)

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/branches/dev" \
  -H "Authorization: Bearer $KEY"
POST/v1/apps/{name}/flags/{key}/kill

Kill switch#

Turn the flag off in one environment or all: its off_value is served and rules and rollouts are ignored. preview includes every branch override. Reverse with revive. Recorded in the history.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • environmentstring

    one of production, preview, development, all · default "all"

  • branchstring

    a preview branch (with environment preview or all)

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/kill" \
  -H "Authorization: Bearer $KEY" \
  -d '{"environment":"all","branch":"dev"}'
POST/v1/apps/{name}/flags/{key}/revive

Turn a killed flag back on#

The same body as kill.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • environmentstring

    one of production, preview, development, all · default "all"

  • branchstring

    a preview branch (with environment preview or all)

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/revive" \
  -H "Authorization: Bearer $KEY" \
  -d '{"environment":"all","branch":"dev"}'
GET/v1/apps/{name}/flags/{key}/history

Who changed what#

The flag's history, newest first, kept after the flag is deleted. Each entry: version, action (create, update, kill, revive, rollback, delete), actor (an email or key name), at, changed (the places that differ from the entry before: an environment, branch:<label>, type, description) and the whole state after it.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

  • limitintegerکوئری

    1 to 200 (default 50)

    1–200

  • beforeintegerکوئری

    only versions below this one

پاسخ

200FlagHistory

  • keystring
  • historyobject[]
    • versioninteger
    • actionstring

      one of create, update, kill, revive, rollback, delete

    • atstring (date-time)
    • actorstring | null
    • detailobject
    • changedstring[]
    • restorableboolean
    • stateobject | null

      the whole flag after the change; null for a deletion

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/history" \
  -H "Authorization: Bearer $KEY"
POST/v1/apps/{name}/flags/{key}/rollback

Roll a flag back#

Restore the whole flag (every environment, branch overrides, description) as it was at a history version. Brings back a deleted flag. Recorded as a new rollback entry; when nothing differs, changed is empty and nothing is recorded.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • versionintegerالزامی

    at least 1

پاسخ

200FlagDetail

  • keystring
  • typestring

    one of boolean, string, number, json

  • descriptionstring
  • versioninteger

    the latest history version

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring | null
  • updated_bystring | null
  • environmentsobject
  • branchesmap of FlagConfig

    preview branch label -> config

  • changedstring[]

    after a change: the places that changed

خطاها

وضعیتتوضیح
400flag_bad_version, flag_bad_state (no longer fits today's rules)
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_not_restorable (a deletion entry), flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/rollback" \
  -H "Authorization: Bearer $KEY" \
  -d '{"version":1}'
POST/v1/apps/{name}/flags/{key}/evaluate

Evaluate a flag for a context#

What a caller would get in an environment (and, for preview, branch), with the reason: off, rule (with the rule id), rollout (with the variant and bucket) or default.

دسترسی
کلید 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مسیرالزامی

    the flag's key

    pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ · up to 64 characters

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

  • environmentstring

    one of production, preview, development · default "production"

  • branchstring
  • contextobject

پاسخ

200FlagEvaluation

  • keystring
  • valueanyالزامی

    a value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)

  • reasonstringالزامی

    one of off, rule, rollout, default, missing

  • rulestring
  • variantinteger
  • bucketinteger

    0-9999

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/evaluate" \
  -H "Authorization: Bearer $KEY" \
  -d '{"environment":"production","branch":"dev","context":{}}'
GET/v1/apps/{name}/flag-tokens

List read-only tokens#

Token ids, names, environments and prefixes; never the token itself.

دسترسی
کلید 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

پاسخ

200FlagTokenList

  • tokensFlagToken[]
    • idstring (uuid)
    • namestring
    • environmentstring

      one of production, preview, development

    • prefixstring
    • created_atstring (date-time)
    • created_bystring | null
    • last_used_atstring (date-time) | null
  • maxinteger

خطاها

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

نمونه

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

Create a read-only token#

A token for the REST read path (/v1/flags/read), bound to one environment. The token is in the answer once and never again. The plan caps tokens 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

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

  • environmentstring

    one of production, preview, development · default "production"

  • namestring

    up to 100 characters

پاسخ

201FlagTokenCreated

  • idstring (uuid)
  • tokenstring

    chf_… shown once

  • environmentstring
  • namestring
  • notestring

خطاها

وضعیتتوضیح
400flag_bad_environment, flag_bad_name
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/flag-tokens" \
  -H "Authorization: Bearer $KEY" \
  -d '{"environment":"production","name":"my-api"}'
DELETE/v1/apps/{name}/flag-tokens/{id}

Revoke a read-only token#

The token stops working within five seconds.

دسترسی
کلید 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 token's id

پاسخ

200object

  • idstring
  • revokedboolean

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/flag-tokens/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
GET/v1/apps/{name}/segments

List segments#

The project's segments and the plan's cap.

دسترسی
کلید 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

پاسخ

200FlagSegmentList

  • segmentsFlagSegmentSummary[]
    • keystring
    • descriptionstring
    • attributestring
    • includedinteger

      how many users are listed

    • excludedinteger
    • rulesinteger
    • used_bystring[]

      the flags whose rules use it

    • created_atstring
    • updated_atstring
    • updated_bystring
  • limitsobject
    • planstring
    • segmentsinteger

خطاها

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

نمونه

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

Create a segment#

A reusable list of users for flag rules (in_segment).

دسترسی
کلید 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

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

پاسخ

201FlagSegment

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

خطاها

وضعیتتوضیح
400flag_bad_segment
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_exists, flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/segments" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","description":"…","attribute":"…","included":["…"],"excluded":["…"],"rules":[{"clauses":[{}]}]}'
GET/v1/apps/{name}/segments/{key}

One segment#

دسترسی
کلید 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مسیرالزامی

    the segment's key

پاسخ

200FlagSegmentDetail

  • segmentFlagSegment
    • keystring
    • descriptionstring
    • attributestring

      what the lists hold (default: the context's key)

    • includedstring[]
    • excludedstring[]
    • rulesobject[]
  • used_bystring[]

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/apps/my-api/segments/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY"
PUT/v1/apps/{name}/segments/{key}

Replace a segment#

دسترسی
کلید 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مسیرالزامی

    the segment's key

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

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

پاسخ

200FlagSegment

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

خطاها

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

نمونه

curl -X PUT "https://api.ibel.ai/v1/apps/my-api/segments/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","description":"…","attribute":"…","included":["…"],"excluded":["…"],"rules":[{"clauses":[{}]}]}'
DELETE/v1/apps/{name}/segments/{key}

Delete a segment#

A segment a flag rule uses cannot be deleted.

دسترسی
کلید 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مسیرالزامی

    the segment's key

پاسخ

200Deleted

  • namestring
  • deletedbooleanالزامی

خطاها

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

نمونه

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

Change a segment#

دسترسی
کلید 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مسیرالزامی

    the segment's key

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

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

پاسخ

200FlagSegment

  • keystring
  • descriptionstring
  • attributestring

    what the lists hold (default: the context's key)

  • includedstring[]
  • excludedstring[]
  • rulesobject[]

خطاها

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

نمونه

curl -X PATCH "https://api.ibel.ai/v1/apps/my-api/segments/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","description":"…","attribute":"…","included":["…"],"excluded":["…"],"rules":[{"clauses":[{}]}]}'
GET/v1/apps/{name}/flag-keys

List flag keys#

Keys for OpenFeature (/ofrep/v1/…): ids, kinds, environments and prefixes; never the key.

دسترسی
کلید 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

پاسخ

200FlagKeyList

  • keysFlagKeyInfo[]
    • idstring
    • namestring
    • kindstring
    • environmentstring
    • prefixstring
    • created_atstring
    • created_bystring

خطاها

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

نمونه

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

Create a flag key#

A server key sees every flag of its environment; a browser key only the flags marked browser. The key is in the answer once.

دسترسی
کلید 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

    up to 100 characters

  • kindstring

    one of server, browser · default "server"

  • environmentstring

    one of production, preview, development · default "production"

پاسخ

201FlagKeyCreated

  • idstring
  • namestring
  • kindstring
  • environmentstring
  • prefixstring
  • created_atstring
  • created_bystring
  • keystring

    chf_… shown once

خطاها

وضعیتتوضیح
400flag_bad_kind, flag_bad_environment, flag_bad_name
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409flag_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/flag-keys" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","kind":"server","environment":"production"}'
DELETE/v1/apps/{name}/flag-keys/{id}

Revoke a flag key#

The key stops working within five seconds.

دسترسی
کلید 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مسیرالزامی

    the key's id

پاسخ

200Deleted

  • namestring
  • deletedbooleanالزامی

خطاها

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

نمونه

curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/flag-keys/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
GET/v1/apps/{name}/flag-audit

Flag audit trail#

Who changed which flag, segment or key, newest first.

دسترسی
کلید 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

  • beforestringکوئری

    an at from the last page

  • limitintegerکوئری

    1-200, default 50

پاسخ

200FlagAudit

  • auditobject[]
    • atstring
    • actorstring
    • actionstring
    • targetstring
    • detailobject

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/apps/my-api/flag-audit" \
  -H "Authorization: Bearer $KEY"
GET/v1/apps/{name}/flag-usage

Flag requests per day#

دسترسی
کلید 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

  • daysintegerکوئری

    1-90, default 30

پاسخ

200FlagUsage

  • daysobject[]
    • daystring
    • requestsinteger
  • totalinteger

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/apps/my-api/flag-usage" \
  -H "Authorization: Bearer $KEY"
GET/v1/flags/read

Read every flag (no context)#

Authorization: Bearer chf_… (a read-only token, not an API key). Every flag's value for the token's environment, evaluated with an empty context (so rules never match and rollouts fall to the default). Not cached: Cache-Control: no-store; cache the answer in your app for a few seconds.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
a read-only flags token

پارامترها

  • keysstringکوئری

    a comma list of flag keys (default: all)

  • branchstringکوئری

    with a preview token: the git branch

پاسخ

200FlagValues

  • environmentstring
  • flagsmap of any

خطاها

وضعیتتوضیح
400flag_bad_keys, flag_bad_context
401unauthorized: missing, invalid, expired or revoked credential
429rate_limited: the plan's reads per second per token
500internal: an unexpected failure

نمونه

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

Evaluate flags for a context#

Authorization: Bearer chf_…. Each requested flag evaluated for context (for example {"key": "user-1", "plan": "pro"}), with the reason. The same rules and the same bucketing as env.FLAGS inside a function, so a user gets the same answer in both places. Targeting rules stay on our side.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
a read-only flags token

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

  • contextobject
  • keysstring[]

    0–200 items

  • branchstring

پاسخ

200FlagEvaluations

  • environmentstring
  • flagsmap of FlagEvaluation

خطاها

وضعیتتوضیح
400flag_bad_keys, flag_bad_context
401unauthorized: missing, invalid, expired or revoked credential
429rate_limited: the plan's reads per second per token
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/flags/read" \
  -H "Authorization: Bearer $KEY" \
  -d '{"context":{},"keys":["…"],"branch":"dev"}'
POST/ofrep/v1/evaluate/flags/{key}

Evaluate one flag (OpenFeature)#

The OpenFeature remote evaluation protocol. An unknown flag, or one a browser key may not see, answers 404 with errorCode: FLAG_NOT_FOUND.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
a flag key

پارامترها

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

    the flag's key

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

  • contextobject

    targetingKey and any attributes

پاسخ

200OfrepEvaluation

  • keystring
  • valueany
  • reasonstring
  • variantstring
  • metadataobject

خطاها

وضعیتتوضیح
401no or a wrong flag key
429past the plan's flag requests (Hobby: 100,000 a month); Retry-After

نمونه

curl -X POST "https://api.ibel.ai/ofrep/v1/evaluate/flags/STRIPE_KEY" \
  -H "Authorization: Bearer $KEY" \
  -d '{"context":{}}'
POST/ofrep/v1/evaluate/flags

Evaluate every flag (OpenFeature)#

Every flag the key may see, with an ETag; If-None-Match with it answers 304 when nothing changed.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
a flag key

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

  • contextobject

    targetingKey and any attributes

پاسخ

200OfrepBulk

  • flagsOfrepEvaluation[]
    • keystring
    • valueany
    • reasonstring
    • variantstring
    • metadataobject

خطاها

وضعیتتوضیح
401no or a wrong flag key
429past the plan's flag requests (Hobby: 100,000 a month); Retry-After

نمونه

curl -X POST "https://api.ibel.ai/ofrep/v1/evaluate/flags" \
  -H "Authorization: Bearer $KEY" \
  -d '{"context":{}}'
GET/ofrep/v1/configuration

What the OpenFeature provider supports#

Cache and polling hints for OFREP providers.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
a flag key

پاسخ

200OfrepConfiguration

  • namestring
  • capabilitiesobject

خطاها

وضعیتتوضیح
401no or a wrong flag key
429past the plan's flag requests (Hobby: 100,000 a month); Retry-After

نمونه

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