Create a feature flag with the given name, key, and variations.
When you create a migration flag, the variations are pre-determined based on the number of stages in the migration.
To create a migration flag, omit the variations
and defaults
information. Instead, provide a purpose
of migration
, and migrationSettings
. If you create a migration flag with six stages, contextKind
is required. Otherwise, it should be omitted.
Here’s an example:
To learn more, read Migration Flags.
The project key
The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting clone=flagKey
copies the full targeting configuration for all environments, including on/off
state, from the original flag to the new flag.
A human-friendly name for the feature flag
A unique key used to reference the flag in your code
Description of the feature flag. Defaults to an empty string.
Which type of client-side SDKs the feature flag is available to
An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of true
and false
will be used.
Whether the flag is a temporary flag. Defaults to true
.
Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration.
The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used.
Purpose of the flag
Settings relevant to flags where purpose
is migration
The ID of the member who maintains this feature flag
The key of the team that maintains this feature flag
Initial set of prerequisite flags for all environments
Deprecated, use clientSideAvailability
. Whether this flag should be made available to the client-side JavaScript SDK. Defaults to false
.
Global flag response
A human-friendly name for the feature flag
Kind of feature flag
A unique key used to reference the flag in your code
Version of the feature flag
Timestamp of flag creation date
An array of possible variations for the flag
Whether the flag is a temporary flag
The location and content type of related resources
Experimentation data for the feature flag
Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration.
Boolean indicating if the feature flag is archived
Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv
query parameter.
Description of the feature flag
Which type of client-side SDKs the feature flag is available to
Associated maintainerId for the feature flag
Associated maintainer member info for the feature flag
The key of the associated team that maintains this feature flag
Associated maintainer team info for the feature flag
If archived is true, date of archive
Boolean indicating if the feature flag is deprecated
If deprecated is true, date of deprecation
The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used.
Migration-related settings for the flag
Deprecated, use clientSideAvailability
. Whether this flag should be made available to the client-side JavaScript SDK
Deprecated, use experiments
instead