Feature flags
Flags per project with boolean, string, number and JSON values, variants per environment and preview branch, targeting rules, sticky percentage rollouts, a kill switch and history with rollback. Read inside a function as env.FLAGS, or over REST with a read-only token.
/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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
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
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
keystringrequiredpattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$typestringrequiredone 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringquerya git branch: adds
branchandbranch_config
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Response
200object
keystringdeletedbooleanversioninteger
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
descriptionstringrequiredup to 500 characters
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_description |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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).
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersenvstringpathrequiredthe environment
one of
production,preview,development
Request bodyapplication/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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringpathrequireda git branch name (its preview label is what is stored)
Request bodyapplication/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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringpathrequireda git branch name (its preview label is what is stored)
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
environmentstringone of
production,preview,development,all· default"all"branchstringa preview branch (with environment preview or all)
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_environment, flag_bad_branch |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/functions/my-api/flags/STRIPE_KEY/kill" \
-H "Authorization: Bearer $KEY" \
-d '{"environment":"all","branch":"dev"}'- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
environmentstringone of
production,preview,development,all· default"all"branchstringa preview branch (with environment preview or all)
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_environment, flag_bad_branch |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characterslimitintegerquery1 to 200 (default 50)
1–200
beforeintegerqueryonly versions below this one
Response
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
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
versionintegerrequiredat least 1
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
environmentstringone of
production,preview,development· default"production"branchstringcontextobject
Response
200FlagEvaluation
keystringvalueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
reasonstringrequiredone of
off,rule,rollout,default,missingrulestringvariantintegerbucketinteger0-9999
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_environment, flag_bad_context |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200FlagTokenList
tokensFlagToken[]idstring (uuid)namestringenvironmentstringone of
production,preview,developmentprefixstringcreated_atstring (date-time)created_bystring | nulllast_used_atstring (date-time) | null
maxinteger
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
environmentstringone of
production,preview,development· default"production"namestringup to 100 characters
Response
201FlagTokenCreated
idstring (uuid)tokenstringchf_… shown once
environmentstringnamestringnotestring
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstring (uuid)pathrequiredthe token's id
Response
200object
idstringrevokedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/flag-tokens/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200FlagSegmentList
segmentsFlagSegmentSummary[]keystringdescriptionstringattributestringincludedintegerhow many users are listed
excludedintegerrulesintegerused_bystring[]the flags whose rules use it
created_atstringupdated_atstringupdated_bystring
limitsobjectplanstringsegmentsinteger
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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).
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Response
201FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Errors
| Status | Description |
|---|---|
| 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 |
Example
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#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe segment's key
Response
200FlagSegmentDetail
segmentFlagSegmentkeystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
used_bystring[]
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/functions/my-api/segments/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/segments/{key}Replace a segment#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe segment's key
Request bodyapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Response
200FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe segment's key
Response
200Deleted
namestringdeletedbooleanrequired
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_segment_in_use |
| 500 | internal: an unexpected failure |
Example
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#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe segment's key
Request bodyapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Response
200FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200FlagKeyList
keysFlagKeyInfo[]idstringnamestringkindstringenvironmentstringprefixstringcreated_atstringcreated_bystring
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
namestringup to 100 characters
kindstringone of
server,browser· default"server"environmentstringone of
production,preview,development· default"production"
Response
201FlagKeyCreated
idstringnamestringkindstringenvironmentstringprefixstringcreated_atstringcreated_bystringkeystringchf_… shown once
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstringpathrequiredthe key's id
Response
200Deleted
namestringdeletedbooleanrequired
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersbeforestringqueryan
atfrom the last pagelimitintegerquery1-200, default 50
Response
200FlagAudit
auditobject[]atstringactorstringactionstringtargetstringdetailobject
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/functions/my-api/flag-audit" \
-H "Authorization: Bearer $KEY"/v1/functions/{name}/flag-usageFlag requests per day#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersdaysintegerquery1-90, default 30
Response
200FlagUsage
daysobject[]daystringrequestsinteger
totalinteger
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
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
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
keystringrequiredpattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$typestringrequiredone 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringquerya git branch: adds
branchandbranch_config
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Response
200object
keystringdeletedbooleanversioninteger
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
descriptionstringrequiredup to 500 characters
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_description |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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).
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersenvstringpathrequiredthe environment
one of
production,preview,development
Request bodyapplication/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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringpathrequireda git branch name (its preview label is what is stored)
Request bodyapplication/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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 charactersbranchstringpathrequireda git branch name (its preview label is what is stored)
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
environmentstringone of
production,preview,development,all· default"all"branchstringa preview branch (with environment preview or all)
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_environment, flag_bad_branch |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/apps/my-api/flags/STRIPE_KEY/kill" \
-H "Authorization: Bearer $KEY" \
-d '{"environment":"all","branch":"dev"}'- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
environmentstringone of
production,preview,development,all· default"all"branchstringa preview branch (with environment preview or all)
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_environment, flag_bad_branch |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characterslimitintegerquery1 to 200 (default 50)
1–200
beforeintegerqueryonly versions below this one
Response
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
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
versionintegerrequiredat least 1
Response
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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo 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[]requiredall must match
1–10 items
attributestringrequireda context attribute; a dotted name reads nested objects
opstringrequiredequalsandnot_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)[]required1–100 items
valueanyrequireda 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[]requiredthe 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
valueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
percentagenumberrequiredtwo decimals at most
0–100
branchesmap of FlagConfigpreview branch label -> config
changedstring[]after a change: the places that changed
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe flag's key
pattern
^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$· up to 64 characters
Request bodyapplication/json
environmentstringone of
production,preview,development· default"production"branchstringcontextobject
Response
200FlagEvaluation
keystringvalueanyrequireda value of the flag's type: boolean, string, number or any JSON (up to 2 KiB)
reasonstringrequiredone of
off,rule,rollout,default,missingrulestringvariantintegerbucketinteger0-9999
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_environment, flag_bad_context |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200FlagTokenList
tokensFlagToken[]idstring (uuid)namestringenvironmentstringone of
production,preview,developmentprefixstringcreated_atstring (date-time)created_bystring | nulllast_used_atstring (date-time) | null
maxinteger
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
environmentstringone of
production,preview,development· default"production"namestringup to 100 characters
Response
201FlagTokenCreated
idstring (uuid)tokenstringchf_… shown once
environmentstringnamestringnotestring
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstring (uuid)pathrequiredthe token's id
Response
200object
idstringrevokedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/flag-tokens/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200FlagSegmentList
segmentsFlagSegmentSummary[]keystringdescriptionstringattributestringincludedintegerhow many users are listed
excludedintegerrulesintegerused_bystring[]the flags whose rules use it
created_atstringupdated_atstringupdated_bystring
limitsobjectplanstringsegmentsinteger
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/apps/my-api/segments" \
-H "Authorization: Bearer $KEY"- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Response
201FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Errors
| Status | Description |
|---|---|
| 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 |
Example
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#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe segment's key
Response
200FlagSegmentDetail
segmentFlagSegmentkeystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
used_bystring[]
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/apps/my-api/segments/STRIPE_KEY" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/segments/{key}Replace a segment#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe segment's key
Request bodyapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Response
200FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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":[{}]}]}'- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe segment's key
Response
200Deleted
namestringdeletedbooleanrequired
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 409 | flag_segment_in_use |
| 500 | internal: an unexpected failure |
Example
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#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characterskeystringpathrequiredthe segment's key
Request bodyapplication/json
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Response
200FlagSegment
keystringdescriptionstringattributestringwhat the lists hold (default: the context's
key)includedstring[]excludedstring[]rulesobject[]clausesobject[]
Errors
| Status | Description |
|---|---|
| 400 | flag_bad_segment |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200FlagKeyList
keysFlagKeyInfo[]idstringnamestringkindstringenvironmentstringprefixstringcreated_atstringcreated_bystring
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
namestringup to 100 characters
kindstringone of
server,browser· default"server"environmentstringone of
production,preview,development· default"production"
Response
201FlagKeyCreated
idstringnamestringkindstringenvironmentstringprefixstringcreated_atstringcreated_bystringkeystringchf_… shown once
Errors
| Status | Description |
|---|---|
| 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 |
Example
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"}'- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstringpathrequiredthe key's id
Response
200Deleted
namestringdeletedbooleanrequired
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/flag-keys/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersbeforestringqueryan
atfrom the last pagelimitintegerquery1-200, default 50
Response
200FlagAudit
auditobject[]atstringactorstringactionstringtargetstringdetailobject
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/apps/my-api/flag-audit" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/flag-usageFlag requests per day#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe function's or app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersdaysintegerquery1-90, default 30
Response
200FlagUsage
daysobject[]daystringrequestsinteger
totalinteger
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- a read-only flags token
Parameters
keysstringquerya comma list of flag keys (default: all)
branchstringquerywith a
previewtoken: the git branch
Response
200FlagValues
environmentstringflagsmap of any
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- a read-only flags token
Request bodyapplication/json
contextobjectkeysstring[]0–200 items
branchstring
Response
200FlagEvaluations
environmentstringflagsmap of FlagEvaluation
Errors
| Status | Description |
|---|---|
| 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 |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- a flag key
Parameters
keystringpathrequiredthe flag's key
Request bodyapplication/json
contextobjecttargetingKeyand any attributes
Response
200OfrepEvaluation
keystringvalueanyreasonstringvariantstringmetadataobject
Errors
| Status | Description |
|---|---|
| 401 | no or a wrong flag key |
| 429 | past the plan's flag requests (Hobby: 100,000 a month); Retry-After |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- a flag key
Request bodyapplication/json
contextobjecttargetingKeyand any attributes
Response
200OfrepBulk
flagsOfrepEvaluation[]keystringvalueanyreasonstringvariantstringmetadataobject
Errors
| Status | Description |
|---|---|
| 401 | no or a wrong flag key |
| 429 | past the plan's flag requests (Hobby: 100,000 a month); Retry-After |
Example
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.
- Credential
- An API key or a dashboard session
- Roles
- a flag key
Response
200OfrepConfiguration
namestringcapabilitiesobject
Errors
| Status | Description |
|---|---|
| 401 | no or a wrong flag key |
| 429 | past the plan's flag requests (Hobby: 100,000 a month); Retry-After |
Example
curl "https://api.ibel.ai/ofrep/v1/configuration" \
-H "Authorization: Bearer $KEY"