Adding a Step via API
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
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Tom Peters on 07 Dec, 2017 01:15 AM
Hi,
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.
Regards,
Tom