Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Get a config flag

Gets a config flag.

Gets a config flag.

  • Path GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags/config-flag
  • Scope config:read
  • Effect read — nothing is written.
  • Collection config_flags

#Request

FieldTypeWhat it is
namestringThe name of the config flag to get. Required.

#Response

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/config_flags/{config_flag}; the id is the key evaluators ask for.
uidstringcfg_<cell><ulid>. Output only.
metaResourceMetaResource metadata.
specConfigFlagSpecDesired state. Required.
statusConfigFlagStatusObserved state. Output only.

#ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

#ConfigFlagSpec

FieldTypeWhat it is
value_typeConfigValueTypeThe type every value of the flag has. Required. One of bool, string, int64, double, json.
default_valuevalueThe value when no rule matches, or when the flag is disabled. Required.
enabledboolWhen false, every evaluation returns default_value and the rules are skipped: a kill switch. Default true.
rulesTargetingRule[]Targeting rules, first match wins.
descriptionstringWhat the flag is for.
client_visibleboolPublishable keys (browsers, mobile apps) may evaluate it with config_flags:evaluate; default false, so a server-only flag's value never reaches a device. Secret keys evaluate every flag.

#ConfigFlagStatus

FieldTypeWhat it is
observed_generationint64The generation this status was computed from. Output only.
conditionsCondition[]Ready, Reconciling, Stalled. Reconciling while a change rolls out in waves; Stalled when a wave's health gate fails and the change halts. Output only.
waveint32The wave the current change has reached, from 1. Output only.
wave_countint32How many waves the change takes. Output only.
updated_cell_countint32How many cells serve the current generation. Output only.
cell_countint32How many cells the environment spans. Output only.

#TargetingRule

FieldTypeWhat it is
valuevalueThe value served when the rule matches; of the flag's type. Required.
percentageint32Serve value to evaluations whose bucket is below this, from 0 to 100; default 100. The rest fall through to the next rule.
bucket_attributestringThe context attribute hashed for the bucket: user_id, anonymous_id, or an attribute path; default user_id, else anonymous_id. An evaluation without it never matches a rule below 100 percent.
descriptionstringWhat the rule is for.
conditionsTargetingCondition[]Conditions over the evaluation context; all must hold. None matches every evaluation.

#Condition

FieldTypeWhat it is
typestringThe condition type, for example Ready.
statusConditionStatusWhether the condition holds. One of true, false, unknown.
observed_generationint64The generation this observation was made against.
reasonstringA machine-readable UpperCamelCase reason.
messagestringA customer-safe human-readable message.
severitySeverityHow severe a FALSE condition is. One of info, warning, error.
transition_timetimestampWhen status last changed.

#TargetingCondition

FieldTypeWhat it is
attributestringuser_id, anonymous_id, or a path into the context's attributes, dot-separated (plan, device.os). Required, except with IN_SEGMENT and NOT_IN_SEGMENT.
operatorConditionOperatorThe comparison. Required. One of equals, not_equals, greater_than, greater_or_equal, less_than, less_or_equal, contains, not_contains, starts_with, ends_with, in, not_in, matches, semver_greater_than, semver_greater_or_equal, semver_less_than, semver_less_or_equal, in_segment, not_in_segment.
valuevalueThe value compared with; a list for IN and NOT_IN, a string for the string, regular expression and semantic version operators. Required.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags/config-flag" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"