Octopus Deploy Documentation

API Examples

Last updated

As you work with the Octopus API, you may need some guidance on how to perform actions or what parameters to provide. The OctopusDeploy-API GitHub repository has many examples using the API. Our plan is to migrate those examples to this site and provide solutions for PowerShell with REST requests, PowerShell using Octopus.Client, and C# using Octopus.Client.

Using the Scripts

To use the example scripts, you'll need to provide your Octopus Deploy server url and an API Key. There may be other values that need to be updated to fit your scenario such as Space, Project, and Environment names.

The examples provided are for reference and should be modified and tested prior to using in a production Octopus instance.

C# Examples

The C# examples are written using dotnet script. The same logic can be used in a standard C# application.

Octopus.Client Examples

Examples using Octopus.Client require the library to be installed and a path to the library to be provided.

In This Section

The following topics are explained further in this section:

Welcome! We use cookies and data about how you use our website allow us to improve the website and your experience, and resolve technical errors. Our website uses cookies and shares some of your data with third party analytics companies for these purposes. We do not use these cookies for advertising.

If you decline, we will respect your privacy. A single cookie will be used in your browser to remember your preference.