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.
The C# examples are written using dotnet script. The same logic can be used in a standard C# application.
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: