Skip to content
FlagSwiftDocs

Flag management

A flag is a named switch that lives in a project and has its own settings in every environment. This page explains what a flag is made of and how it is managed over its life.

What a flag is made of#

Parts of a flag
PartTypeDescription
KeyThe identifier your code reads. Lower case letters, numbers, hyphens and underscores. It does not change after creation, and an archived flag keeps it.
Name and descriptionFor people. You can edit both at any time.
Typeboolean, string, number, JSONChosen when the flag is created and fixed afterwards. Boolean flags are on or off; the other types serve a value from 2 to 20 variants.
Environment settingsWhether the flag is on, who gets it and what is served when it is off. Each environment has its own, and a new flag starts disabled in every one.
PrerequisitesOther flags that must be on first. FlagSwift checks for loops and for chains that are too deep.
LifecycleOwner, expected removal date, expiry and whether the flag is permanent.

The life of a flag#

  • Create. Set the name, key, type and an optional description. The flag begins disabled everywhere.
  • Configure. Per environment, turn it on, add targeting rules and rollouts, and send changes through scheduled or approved releases.
  • Watch. Every change is saved as a version, so you can see who did what and roll back. Outcome analytics shows what the flag did.
  • Retire. Use the lifecycle tools to spot stale flags, read the removal advice and archive them. An archived flag is hidden and read-only until restored.

Organizing flags#

Search the flag list by name or key, and filter by environment and status, by type, or by active and archived. Pin the flags you check often; pins are yours alone and you can pin up to 3. Admins can move a flag to another project, and every environment setting and its history move with it.

Permissions

Who can create, edit, archive or move flags depends on the role. See Give people the right access and the flags.* permissions in the Flags API.

Go deeper#