Exporting elements in Octopus as API commands


One of the issues I find with Octopus is the fact that users go and create a lot of projects, steps, variables etc very quickly using the GUI, then don’t take advantages of using Octo.exe or the API to re-create tasks they’ve already created in the GUI.

I like the fact that when you install a tentacle, you get the option of exporting the installation steps as a script, and I was wondering whether there was a quick way of exporting configurations from Octopus as a script that can be used in the API or through Octo.exe? Something like an export object as script option in the web interface? This probably exists already, or I’m missing something, but wondered if something like this was possible?


Hi Andrew,

Thanks for reaching out. The only place where the “Export as script” feature exists is when installing Octopus/Tentacles. There’s isn’t such a feature for creating projects, targets, variables, using octo.exe, etc.

To know more about Octo.exe you can check our docs: http://docs.octopusdeploy.com/display/OD/Octo.exe+Command+Line

To see API usage examples you can check this repo: https://github.com/OctopusDeploy/OctopusDeploy-Api . Early next year we’ll start using an API documentation tool (most likely Swagger) to provide a better learning experience for the Octopus API.

There’s also an Open Source project called Octoposh which has a lot of cmdlets to create things in Octopus. It has a pretty good documentation and a Gitter channel where you can ask for help. Http://Octoposh.net