How to Export/import some variables from one project to another

What is the current status of exporting some (not all) variables from project A and then importing that subset to project B?

I know I can export to JSON but that includes hardcoded IDs.

Older posts stated that this would be part of the UI overhaul. Did that happen?

Hi Michael,

Thanks for getting in touch,

As part of the UI overhaul introduced in Octopus 4.0 an option was added to the Project Variables area to ‘Download as JSON’ via the settings icon as shown below;

The import process, however, will still need to be scripted. I’ve included a link below to an example script that is based on getting a variable set from the API. Hopefully, this is helpful for starting your own script.

I hope this helps!

If I’ve misunderstood your query in any way, or you require further assistance, please let me know :slight_smile:

Kind Regards,

Reece

Hi Reece - We have been able to leverage Variable Sets to accomplish what we need. (I’m not sure how to mark this item as “resolved” in this new forum…)

Hi Michael,

Thanks for getting in touch,

I greatly appreciate your time in letting me know the outcome of this, I’m glad to hear you were able to accomplish this.

If you require any assistance moving forward, please let me know :slight_smile:

Since we’ve moved over to a new support forum, we’re still adjusting some things, in the interim, we’ll need to close the issue on this end.

Have a great day!

Kind Regards,

Reece