Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

sylphx config config_flags

Every sylphx config config_flags command: its argument, its flags and a run line.

The config_flags commands of Sylphx Config, as the CLI spells them: the same calls as the config_flags API page, typed for the shell. Install, sign in and the grammar are on the CLI index.

#get

Gets a config flag.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx config config-flags get orgs/acme/projects/shop/envs/production/config_flags/config-flag

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags/config-flag · scope config:read · effect read · Request, response and examples

#list

Lists config flags in an environment.

PARENT — optional: the CLI fills it from the linked project or the key's scope when it is left out.

CLI

Shell
sylphx config config-flags list orgs/acme/projects/shop/envs/production

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags · scope config:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many; default 50, clamped to 1000.
--page-tokenstringnext_page_token of the previous page.
--filterstringAIP-160 filter over labels and filterable fields.
--order-bystringAIP-132 ordering over filterable fields.

#create

Creates a config flag; the Operation is done when every cell serves it.

ID — The id segment of the new Resource's name; the server assigns one when omitted.

CLI

Shell
sylphx config config-flags create --parent orgs/acme/projects/shop/envs/production --spec.value-type bool

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags · scope config:write · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--parentstringThe parent to create in; defaults to the linked project or the key's scope.
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.value-typeenumThe type every value of the flag has. Required. One of bool, string, int64, double, json.
--spec.default-valuejsonThe value when no rule matches, or when the flag is disabled. Required.
--spec.enabledboolWhen false, every evaluation returns default_value and the rules are skipped: a kill switch. Default true.
--spec.rulesjsonTargeting rules, first match wins. Repeat the flag for each value.
--spec.descriptionstringWhat the flag is for.
--spec.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.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.

#update

Updates a config flag; the change rolls out in waves and the Operation is done when every cell serves it.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx config config-flags update orgs/acme/projects/shop/envs/production/config_flags/config-flag

PATCH https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags/config-flag · scope config:write · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.default-valuejsonThe value when no rule matches, or when the flag is disabled. Required.
--spec.enabledboolWhen false, every evaluation returns default_value and the rules are skipped: a kill switch. Default true.
--spec.rulesjsonTargeting rules, first match wins. Repeat the flag for each value.
--spec.descriptionstringWhat the flag is for.
--spec.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.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.

#delete

Deletes a config flag; evaluators then get their compiled-in fallback.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx config config-flags delete orgs/acme/projects/shop/envs/production/config_flags/config-flag --yes

DELETE https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags/config-flag · scope config:write · effect destructive · Request, response and examples

Flags

FlagTypeWhat it does
--etagstringDelete only if the current etag matches.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.
--yesboolDo not ask before this destructive call.

#evaluate

Evaluates config flags of an environment for one evaluation context: each flag's value, and why. Browsers and mobile apps call it with a publishable key holding config:evaluate, which reads values, never rules.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx config config-flags evaluate orgs/acme/projects/shop/envs/production

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags:evaluate · scope config:evaluate · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--contextjsonWho and what the evaluation is for.
--config-flagsstringThe ids of the flags to evaluate; empty evaluates every flag of the environment. An unknown id answers reason NOT_FOUND. Repeat the flag for each value.

#snapshot

The environment's flags and segments in one read, for SDKs that evaluate locally. Poll it with if_none_match set to the last etag: an unchanged ruleset answers not_modified and nothing else.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx config config-flags snapshot orgs/acme/projects/shop/envs/production

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_flags:snapshot · scope config:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--if-none-matchstringThe etag of the snapshot the caller holds; unchanged answers not_modified.