How can we help?

How do you sync between environments? Can it be automated?

We don’t have a “promote from environment A to B” workflow built into the tool yet, though we hope to be able to support this functionality in the future.

An available workaround is to use our REST API to automate this. A common use case is to copy a flag's configuration from one environment to another:

To do this, you will first use the Get feature flag endpoint to get the data from the flag you want to import: https://apidocs.launchdarkly.com/docs/get-feature-flag 
Then, use the Update feature flag endpoint to update the flag configurations in production: https://apidocs.launchdarkly.com/docs/update-feature-flag

We do have a script available that you can use to automate the process of syncing an entire environment: https://github.com/launchdarkly/sync-ld-flags

It's important to note that this script does not work to copy in segments or any rules targeting users by segment.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request