فیچر فلگها
فلگ برای هر پروژه با مقدار هر محیط و شاخه، قانونهای هدفگیری، انتشار تدریجی، کلید قطع اضطراری و تاریخچه با بازگشت.
/v1/functions/{name}/flagsList 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[]keystringtypestringone of
boolean,string,number,jsondescriptionstringcreated_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagEnvSummaryenabledbooleanvalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
rulesintegerrollout_percentagenumber
previewFlagEnvSummaryenabledbooleanvalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
rulesintegerrollout_percentagenumber
developmentFlagEnvSummaryenabledbooleanvalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
rulesintegerrollout_percentagenumber
branchesintegerpreview-branch overrides
limitsFlagLimitsplanstringflagsintegerHobby 10, Pro 500, Enterprise 5000
flags_usedintegerrules_per_configintegerbranch_overridesintegerread_tokensintegerread_requests_per_secondinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/flags" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/flagsCreate 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,jsondescriptionstringup to 500 characters
valueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
configFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
environmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
پاسخ
201Flag
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_key, flag_bad_type, flag_bad_value, flag_bad_rule, flag_bad_rollout, flag_bad_config |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_exists, flag_limit |
| 500 | internal: 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"}'/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringکوئریa git branch: adds
branchandbranch_config
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
پاسخ
200object
keystringdeletedbooleanversioninteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/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 characterskeystringمسیرالزامی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
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_description |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X PATCH "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY" \
-H "Authorization: Bearer $KEY" \
-d '{"description":"…"}'/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersenvstringمسیرالزامی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.
enabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_value, flag_bad_rule, flag_bad_rollout, flag_bad_percentage, flag_bad_config |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_limit (too many rules for the plan) |
| 500 | internal: 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}]}}'/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringمسیرالزامی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.
enabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_branch, flag_bad_value, flag_bad_rule |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_limit |
| 500 | internal: 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}]}}'/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringمسیرالزامیa git branch name (its preview label is what is stored)
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/branches/dev" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/flags/{key}/killKill 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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
بدنهٔ درخواستapplication/json
environmentstringone of
production,preview,development,all· default"all"branchstringa preview branch (with environment preview or all)
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_branch |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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"}'- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
بدنهٔ درخواستapplication/json
environmentstringone of
production,preview,development,all· default"all"branchstringa preview branch (with environment preview or all)
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_branch |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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"}'/v1/functions/{name}/flags/{key}/historyWho 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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characterslimitintegerکوئری1 to 200 (default 50)
1–200
beforeintegerکوئریonly versions below this one
پاسخ
200FlagHistory
keystringhistoryobject[]versionintegeractionstringone of
create,update,kill,revive,rollback,deleteatstring (date-time)actorstring | nulldetailobjectchangedstring[]restorablebooleanstateobject | nullthe whole flag after the change; null for a deletion
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/history" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/flags/{key}/rollbackRoll 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 characterskeystringمسیرالزامی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
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_version, flag_bad_state (no longer fits today's rules) |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_not_restorable (a deletion entry), flag_limit |
| 500 | internal: 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}'/v1/functions/{name}/flags/{key}/evaluateEvaluate 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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
بدنهٔ درخواستapplication/json
environmentstringone of
production,preview,development· default"production"branchstringcontextobject
پاسخ
200FlagEvaluation
keystringvalueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
reasonstringالزامیone of
off,rule,rollout,default,missingrulestringvariantintegerbucketinteger0-9999
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_context |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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":{}}'/v1/functions/{name}/flag-tokensList 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)namestringenvironmentstringone of
production,preview,developmentprefixstringcreated_atstring (date-time)created_bystring | nulllast_used_atstring (date-time) | null
maxinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/flag-tokens" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/flag-tokensCreate 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
environmentstringone of
production,preview,development· default"production"namestringup to 100 characters
پاسخ
201FlagTokenCreated
idstring (uuid)tokenstringchf_… shown once
environmentstringnamestringnotestring
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_name |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_limit |
| 500 | internal: 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"}'/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 charactersidstring (uuid)مسیرالزامیthe token's id
پاسخ
200object
idstringrevokedboolean
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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"- دسترسی
- کلید 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[]keystringdescriptionstringattributestringincludedintegerhow many users are listed
excludedintegerrulesintegerused_bystring[]the flags whose rules use it
created_atstringupdated_atstringupdated_bystring
limitsobjectplanstringsegmentsinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/segments" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/segmentsCreate 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
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
پاسخ
201FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_exists, flag_limit |
| 500 | internal: 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":[{}]}]}'/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 characterskeystringمسیرالزامیthe segment's key
پاسخ
200FlagSegmentDetail
segmentFlagSegmentkeystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
used_bystring[]
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/segments/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/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 characterskeystringمسیرالزامیthe segment's key
بدنهٔ درخواستapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
پاسخ
200FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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":[{}]}]}'/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 characterskeystringمسیرالزامیthe segment's key
پاسخ
200Deleted
namestringdeletedbooleanالزامی
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_segment_in_use |
| 500 | internal: an unexpected failure |
نمونه
curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/segments/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/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 characterskeystringمسیرالزامیthe segment's key
بدنهٔ درخواستapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
پاسخ
200FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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":[{}]}]}'/v1/functions/{name}/flag-keysList 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[]idstringnamestringkindstringenvironmentstringprefixstringcreated_atstringcreated_bystring
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/flag-keys" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/flag-keysCreate 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
namestringup to 100 characters
kindstringone of
server,browser· default"server"environmentstringone of
production,preview,development· default"production"
پاسخ
201FlagKeyCreated
idstringnamestringkindstringenvironmentstringprefixstringcreated_atstringcreated_bystringkeystringchf_… shown once
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_kind, flag_bad_environment, flag_bad_name |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_limit |
| 500 | internal: 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"}'/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 charactersidstringمسیرالزامیthe key's id
پاسخ
200Deleted
namestringdeletedbooleanالزامی
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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"/v1/functions/{name}/flag-auditFlag 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 charactersbeforestringکوئریan
atfrom the last pagelimitintegerکوئری1-200, default 50
پاسخ
200FlagAudit
auditobject[]atstringactorstringactionstringtargetstringdetailobject
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/flag-audit" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/flag-usageFlag 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 charactersdaysintegerکوئری1-90, default 30
پاسخ
200FlagUsage
daysobject[]daystringrequestsinteger
totalinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/functions/my-api/flag-usage" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/flagsList 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[]keystringtypestringone of
boolean,string,number,jsondescriptionstringcreated_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagEnvSummaryenabledbooleanvalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
rulesintegerrollout_percentagenumber
previewFlagEnvSummaryenabledbooleanvalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
rulesintegerrollout_percentagenumber
developmentFlagEnvSummaryenabledbooleanvalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
rulesintegerrollout_percentagenumber
branchesintegerpreview-branch overrides
limitsFlagLimitsplanstringflagsintegerHobby 10, Pro 500, Enterprise 5000
flags_usedintegerrules_per_configintegerbranch_overridesintegerread_tokensintegerread_requests_per_secondinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/flags" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/flagsCreate 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,jsondescriptionstringup to 500 characters
valueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
configFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
environmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
پاسخ
201Flag
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_key, flag_bad_type, flag_bad_value, flag_bad_rule, flag_bad_rollout, flag_bad_config |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_exists, flag_limit |
| 500 | internal: 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"}'/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringکوئریa git branch: adds
branchandbranch_config
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
پاسخ
200object
keystringdeletedbooleanversioninteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/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 characterskeystringمسیرالزامی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
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_description |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X PATCH "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY" \
-H "Authorization: Bearer $KEY" \
-d '{"description":"…"}'/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersenvstringمسیرالزامی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.
enabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_value, flag_bad_rule, flag_bad_rollout, flag_bad_percentage, flag_bad_config |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_limit (too many rules for the plan) |
| 500 | internal: 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}]}}'/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringمسیرالزامی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.
enabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_branch, flag_bad_value, flag_bad_rule |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_limit |
| 500 | internal: 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}]}}'/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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringمسیرالزامیa git branch name (its preview label is what is stored)
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/branches/dev" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/flags/{key}/killKill 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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
بدنهٔ درخواستapplication/json
environmentstringone of
production,preview,development,all· default"all"branchstringa preview branch (with environment preview or all)
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_branch |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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"}'- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
بدنهٔ درخواستapplication/json
environmentstringone of
production,preview,development,all· default"all"branchstringa preview branch (with environment preview or all)
پاسخ
200FlagDetail
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_branch |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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"}'/v1/apps/{name}/flags/{key}/historyWho 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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characterslimitintegerکوئری1 to 200 (default 50)
1–200
beforeintegerکوئریonly versions below this one
پاسخ
200FlagHistory
keystringhistoryobject[]versionintegeractionstringone of
create,update,kill,revive,rollback,deleteatstring (date-time)actorstring | nulldetailobjectchangedstring[]restorablebooleanstateobject | nullthe whole flag after the change; null for a deletion
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/history" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/flags/{key}/rollbackRoll 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 characterskeystringمسیرالزامی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
keystringtypestringone of
boolean,string,number,jsondescriptionstringversionintegerthe latest history version
created_atstring (date-time)updated_atstring (date-time)created_bystring | nullupdated_bystring | nullenvironmentsobjectproductionFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
previewFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
developmentFlagConfigenabledbooleanfalse is the kill switch
default
truevalueanya value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
off_valueanya 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
idstringassigned if left out
namestringup to 100 characters
clausesFlagClause[]الزامیall must match
1–10 items
attributestringالزامیa context attribute; a dotted name reads nested objects
opstringالزامیequalsandnot_equalstake one value;containsalso checks a list attribute for an element; the negative operators match a missing attributeone of
equals,not_equals,in,not_in,contains,not_contains,starts_with,ends_withvalues(string | number | boolean)[]الزامی1–100 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberonly this share of the matching keys get it (default 100); the key is hashed as for a rollout
0–100
rolloutFlagRollout | nullbucket_bystringthe context attribute whose value is hashed (default
key); a context without it skips the rolloutsaltstringchange it to reshuffle who is in
up to 64 characters
variantsobject[]الزامیthe percentages add up to at most 100; the rest get
value. A key's bucket (0-9999) is a fixed hash of flag.salt.key, so a key always lands in the same place and raising a percentage only adds keys1–10 items
valueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberالزامیtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_version, flag_bad_state (no longer fits today's rules) |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_not_restorable (a deletion entry), flag_limit |
| 500 | internal: 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}'/v1/apps/{name}/flags/{key}/evaluateEvaluate 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 characterskeystringمسیرالزامیthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
بدنهٔ درخواستapplication/json
environmentstringone of
production,preview,development· default"production"branchstringcontextobject
پاسخ
200FlagEvaluation
keystringvalueanyالزامیa value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
reasonstringالزامیone of
off,rule,rollout,default,missingrulestringvariantintegerbucketinteger0-9999
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_context |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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":{}}'/v1/apps/{name}/flag-tokensList 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)namestringenvironmentstringone of
production,preview,developmentprefixstringcreated_atstring (date-time)created_bystring | nulllast_used_atstring (date-time) | null
maxinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/flag-tokens" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/flag-tokensCreate 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
environmentstringone of
production,preview,development· default"production"namestringup to 100 characters
پاسخ
201FlagTokenCreated
idstring (uuid)tokenstringchf_… shown once
environmentstringnamestringnotestring
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_environment, flag_bad_name |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_limit |
| 500 | internal: 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"}'/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 charactersidstring (uuid)مسیرالزامیthe token's id
پاسخ
200object
idstringrevokedboolean
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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"- دسترسی
- کلید 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[]keystringdescriptionstringattributestringincludedintegerhow many users are listed
excludedintegerrulesintegerused_bystring[]the flags whose rules use it
created_atstringupdated_atstringupdated_bystring
limitsobjectplanstringsegmentsinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/segments" \
-H "Authorization: Bearer $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
بدنهٔ درخواستapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
پاسخ
201FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_exists, flag_limit |
| 500 | internal: 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":[{}]}]}'/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 characterskeystringمسیرالزامیthe segment's key
پاسخ
200FlagSegmentDetail
segmentFlagSegmentkeystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
used_bystring[]
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/segments/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/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 characterskeystringمسیرالزامیthe segment's key
بدنهٔ درخواستapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
پاسخ
200FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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":[{}]}]}'- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringمسیرالزامیthe segment's key
پاسخ
200Deleted
namestringdeletedbooleanالزامی
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_segment_in_use |
| 500 | internal: an unexpected failure |
نمونه
curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/segments/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/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 characterskeystringمسیرالزامیthe segment's key
بدنهٔ درخواستapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
پاسخ
200FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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":[{}]}]}'/v1/apps/{name}/flag-keysList 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[]idstringnamestringkindstringenvironmentstringprefixstringcreated_atstringcreated_bystring
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/flag-keys" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/flag-keysCreate 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
namestringup to 100 characters
kindstringone of
server,browser· default"server"environmentstringone of
production,preview,development· default"production"
پاسخ
201FlagKeyCreated
idstringnamestringkindstringenvironmentstringprefixstringcreated_atstringcreated_bystringkeystringchf_… shown once
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_kind, flag_bad_environment, flag_bad_name |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_limit |
| 500 | internal: 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"}'- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstringمسیرالزامیthe key's id
پاسخ
200Deleted
namestringdeletedbooleanالزامی
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: 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"- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersbeforestringکوئریan
atfrom the last pagelimitintegerکوئری1-200, default 50
پاسخ
200FlagAudit
auditobject[]atstringactorstringactionstringtargetstringdetailobject
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/flag-audit" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/flag-usageFlag 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 charactersdaysintegerکوئری1-90, default 30
پاسخ
200FlagUsage
daysobject[]daystringrequestsinteger
totalinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/flag-usage" \
-H "Authorization: Bearer $KEY"/v1/flags/readRead 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
previewtoken: the git branch
پاسخ
200FlagValues
environmentstringflagsmap of any
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_keys, flag_bad_context |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 429 | rate_limited: the plan's reads per second per token |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/flags/read" \
-H "Authorization: Bearer $KEY"/v1/flags/readEvaluate 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
contextobjectkeysstring[]0–200 items
branchstring
پاسخ
200FlagEvaluations
environmentstringflagsmap of FlagEvaluation
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | flag_bad_keys, flag_bad_context |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 429 | rate_limited: the plan's reads per second per token |
| 500 | internal: an unexpected failure |
نمونه
curl -X POST "https://api.ibel.ai/v1/flags/read" \
-H "Authorization: Bearer $KEY" \
-d '{"context":{},"keys":["…"],"branch":"dev"}'/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
contextobjecttargetingKeyand any attributes
پاسخ
200OfrepEvaluation
keystringvalueanyreasonstringvariantstringmetadataobject
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | no or a wrong flag key |
| 429 | past 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":{}}'/ofrep/v1/evaluate/flagsEvaluate 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
contextobjecttargetingKeyand any attributes
پاسخ
200OfrepBulk
flagsOfrepEvaluation[]keystringvalueanyreasonstringvariantstringmetadataobject
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | no or a wrong flag key |
| 429 | past 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":{}}'/ofrep/v1/configurationWhat the OpenFeature provider supports#
Cache and polling hints for OFREP providers.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- a flag key
پاسخ
200OfrepConfiguration
namestringcapabilitiesobject
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | no or a wrong flag key |
| 429 | past the plan's flag requests (Hobby: 100,000 a month); Retry-After |
نمونه
curl "https://api.ibel.ai/ofrep/v1/configuration" \
-H "Authorization: Bearer $KEY"