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#
| Part | Type | Description |
|---|---|---|
| Key | The 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 description | For people. You can edit both at any time. | |
| Type | boolean, string, number, JSON | Chosen 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 settings | Whether 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. | |
| Prerequisites | Other flags that must be on first. FlagSwift checks for loops and for chains that are too deep. | |
| Lifecycle | Owner, 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#
- Create, edit and organize flagsKeys, names, pins, moving, archiving and restoring.
- Choose a flag type and variantsBoolean, string, number and JSON.
- Make one flag depend on anotherPrerequisites and their checks.
- Review history and roll backEvery change is a version.
- Give every flag an owner and an end dateOwner, expected removal and expiry.
- Find and remove stale flagsRemoval advice and bulk archive.
- Link flags to your codeSee where each flag is used.
- Flags APIDo all of this from code.