π© Feature flag tools
List, inspect, create, update, kill, restore, archive, and delete feature flags and their per-environment definitions.
Feature flags (called splits in the underlying API) are the core of FME. A flag has workspace-level metadata (name, description, tags, owners, rollout status) and, separately, a per-environment definition (treatments and targeting rules). The tools below mirror that split: some operate on the flag itself, others on its definition in a given environment.
All tools take a
workspace_id, as an ID or a name. Discover them with the workspace & environment tools.
Flag metadata
list_feature_flags
List feature flags in a workspace.
| Argument | Type | Default | Description |
|---|---|---|---|
workspace_id | string | β | The workspace ID or name |
limit | number | 20 | Number of results to return (max 50) |
offset | number | 0 | Pagination offset |
tag | string | β | Filter flags by tag (e.g. Mobile Suite) |
rollout_status_id | string | β | Filter by rollout status UUID (see list_rollout_statuses) |
name | string | β | Filter flags by name (partial match) |
get_feature_flag
Get metadata for a specific feature flag. Owners come back with their display
names beside their IDs (name: null when the API will not say).
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
flag_name | string | The feature flag name |
create_feature_flag
Create a new feature flag for a given traffic type.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
traffic_type | string | The traffic type ID or name (e.g. user) |
name | string | The flag name (unique per workspace) |
description | string | Optional description |
update_feature_flag
Partial update of a flag's description, tags, owners, or rollout status (sent as a JSON Patch). Provide at least one field.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
flag_name | string | The feature flag name |
description | string | New description |
tags | array | Tags to set β { name: string } objects or plain strings |
owners | array | Owners to set β { id, type } objects |
rollout_status_id | string | Rollout status UUID (see list_rollout_statuses) |
delete_feature_flag
Permanently delete a feature flag from a workspace. Irreversible.
| Argument | Type | Default | Description |
|---|---|---|---|
workspace_id | string | β | The workspace ID or name |
flag_name | string | β | The feature flag name |
confirm | boolean | false | Must be true to execute |
archive_feature_flag
Archive a flag β removes it from active use while preserving history. Subject to OPA policy checks (returns 409 on failure).
| Argument | Type | Default | Description |
|---|---|---|---|
workspace_id | string | β | The workspace ID or name |
flag_name | string | β | The feature flag name |
confirm | boolean | false | Must be true to execute |
unarchive_feature_flag
Unarchive a previously archived flag, restoring it to active use.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
flag_name | string | The feature flag name |
Kill switch
kill_feature_flag
Kill (disable) a flag in an environment β forces all traffic to the default treatment. This is the fast, reversible emergency switch.
| Argument | Type | Default | Description |
|---|---|---|---|
workspace_id | string | β | The workspace ID or name |
environment_id | string | β | The environment ID or name |
flag_name | string | β | The feature flag name |
confirm | boolean | false | Must be true to execute |
restore_feature_flag
Restore (re-enable) a killed flag in an environment, resuming normal traffic routing.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
environment_id | string | The environment ID or name |
flag_name | string | The feature flag name |
Flag definitions (per environment)
A flag definition holds the treatments and targeting rules for a flag in one environment. The flag can exist without a definition in a given environment.
list_flag_definitions
List all flag definitions (targeting rules) in a specific environment.
| Argument | Type | Default | Description |
|---|---|---|---|
workspace_id | string | β | The workspace ID or name |
environment_id | string | β | The environment ID or name |
limit | number | 20 | Number of results to return (max 50) |
offset | number | 0 | Pagination offset |
get_flag_definition
Get the targeting rules and treatment definition of a flag in a specific environment.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
environment_id | string | The environment ID or name |
flag_name | string | The feature flag name |
compare_flag_environments
Read one flag in every environment, or the ones named, side by side: whether it
is defined, killed, the default treatment and rule, traffic allocation,
treatments with their key counts and segments, the targeting rules, and the last
update with its ISO time. differences lists the fields that are not the same
everywhere; treatments compare on their full membership, so equal counts with
different keys still differ.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
flag_name | string | The feature flag name |
environments | string[] | Environment names or IDs to compare (default: all) |
get_flag_history
A flag's change history in one environment, newest first: time (with ISO), title, change type, approvers, edited by and status (the columns of the web UI's audit log), then the default rule before and after and a field-level diff against the previous change.
The admin API has no audit log, and past definitions cannot be fetched by
changeNumber. This reads the flag's change requests, each carrying the
definition it proposed. A change made without an approval flow is not recorded
by the API and does not appear. It needs an API key with access to change
requests; a key restricted to environments gets a 401.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
environment_id | string | The environment ID or name |
flag_name | string | The feature flag name |
status | string | Change request status (default PUBLISHED) |
limit | number | Most changes to return, 1 to 100 (default 20) |
create_flag_definition
Create (activate) a flag definition in an environment with treatments and targeting rules.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
environment_id | string | The environment ID or name |
flag_name | string | The feature flag name |
definition | string | Full definition as a JSON string β must include treatments and defaultRule |
update_flag_definition
Fully replace a flag definition (treatments, targeting rules) in an environment.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |
environment_id | string | The environment ID or name |
flag_name | string | The feature flag name |
definition | string | Complete updated definition as a JSON string β replaces the existing one |
delete_flag_definition
Remove a flag definition from an environment. The flag itself remains, but loses its targeting rules in that environment.
| Argument | Type | Default | Description |
|---|---|---|---|
workspace_id | string | β | The workspace ID or name |
environment_id | string | β | The environment ID or name |
flag_name | string | β | The feature flag name |
confirm | boolean | false | Must be true to execute |
Rollout statuses
list_rollout_statuses
List rollout status definitions for a workspace (e.g. Killed, Permanent,
Ramping, Pre-Production). Use the returned UUIDs to filter flags via
list_feature_flags's rollout_status_id argument or to set one with
update_feature_flag.
| Argument | Type | Description |
|---|---|---|
workspace_id | string | The workspace ID or name |