No results for ""
EXPAND ALL
  • Home
  • API docs

Clone environments

Read time: 1 minute
Last edited: Aug 23, 2024

Overview

This topic explains how to clone environments in LaunchDarkly.

Clone environments

For organizations with many flags, cloning an environment is the fastest way to create an environment and copy current flag settings from an existing environment. Cloning an environment also copies segment and flag rules for that environment.

When you clone an environment, the following restrictions apply:

  • You cannot clone an environment if it has more than 1,000 segments.
  • When you clone an environment, context targeting does not carry over to the new environment, because contexts may not exist in both environments.
  • Contexts in segments do not carry over to the new environment. Instead, LaunchDarkly creates an empty segment as a placeholder for flag rules to reference. To learn how to add contexts to these segments, read Segments.

Cloning an environment is currently only available through the REST API.

You can use the REST API: Create environment. Use the source field in the request body to pass in the environment to clone from.