Adding a Step via API

nico.calvo2014's Avatar


06 Dec, 2017 08:43 PM

Hi guys,

I need to create Step in some determined DeploymentProcess through the API. I was wondering if Is it possible to do it avoid using the Octopus.Client. Do i need to create an ActionTemplate before?? I tried this and it did not work.
                $deploymentProcess = (Invoke-WebRequest "$uri" -Method Get -Headers $header) | ConvertFrom-Json

                $JsonStep = $newStep |ConvertFrom-Json
                $deploymentProcess.Steps += ($JsonStep)
                $body = $deploymentProcess | ConvertTo-Json
                Invoke-WebRequest "$uri" -Method Put -Headers $header -Body -$body

  1. Support Staff 1 Posted by Tom Peters on 07 Dec, 2017 01:15 AM

    Tom Peters's Avatar


    Thanks for getting in touch.

    We have some examples of how to use the Ocotpus API in our API Repository.

    This example in particular shows how you can add a script step to a deployment process. This would make a good starting point for your own script.


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac