Copy feature flag

Copying flag settings is an Enterprise feature

Copying flag settings is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Copy flag settings from a source environment to a target environment.

By default, this operation copies the entire flag configuration. You can use the includedActions or excludedActions to specify that only part of the flag configuration is copied.

If you provide the optional currentVersion of a flag, this operation tests to ensure that the current flag version in the environment matches the version you’ve specified. The operation rejects attempts to copy flag settings if the environment’s current version of the flag does not match the version you’ve specified. You can use this to enforce optimistic locking on copy attempts.

Path parameters

projectKeystringRequired
The project key
featureFlagKeystringRequired
The feature flag key. The key identifies the flag in your code.

Headers

AuthorizationstringRequired

Request

This endpoint expects an object.
sourceobjectRequired
The source environment
targetobjectRequired
The target environment
commentstringOptional
Optional comment
includedActionslist of enumsOptional

Optional list of the flag changes to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.

excludedActionslist of enumsOptional

Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.

Response

Global flag response
namestring

A human-friendly name for the feature flag

kindenum
Kind of feature flag
Allowed values:
keystring
A unique key used to reference the flag in your code
_versioninteger
Version of the feature flag
creationDatelong
Timestamp of flag creation date
variationslist of objects
An array of possible variations for the flag
temporaryboolean
Whether the flag is a temporary flag
tagslist of strings
Tags for the feature flag
experimentsobject
Experimentation data for the feature flag
customPropertiesmap from strings to objects
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.
archivedboolean
Boolean indicating if the feature flag is archived
descriptionstring or null
Description of the feature flag
clientSideAvailabilityobject or null

Which type of client-side SDKs the feature flag is available to

maintainerIdstring or null
Associated maintainerId for the feature flag
_maintainerobject or null
Associated maintainer member info for the feature flag
maintainerTeamKeystring or null
The key of the associated team that maintains this feature flag
_maintainerTeamobject or null
Associated maintainer team info for the feature flag
archivedDatelong or null
If archived is true, date of archive
deprecatedboolean or null
Boolean indicating if the feature flag is deprecated
deprecatedDatelong or null
If deprecated is true, date of deprecation
defaultsobject or null
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.
_purposestring or null
migrationSettingsobject or null

Migration-related settings for the flag

environmentsmap from strings to objects or null

Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv query parameter.

includeInSnippetboolean or nullDeprecated

Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK

goalIdslist of strings or nullDeprecated

Deprecated, use experiments instead

Errors