Adding a step to an existing project

Hello Octopus Support,

I am trying to write a Powershell script to modify a project by adding a step to it. I am having problems trying to figure out how to do this. From my understanding, the steps are stored in /api/deploymentprocesses/{deploymentprocessId}/.

I guess my question is, how would I add a step (assuming I already have the step I want to add stored in a variable) to a specified project?

Thank you!

Hi Heath,

Thanks for reaching out & sorry for the delay here. Here’s a code example:

Script.ps1 contains the logic to add the step and step.JSON contains the raw JSON step.

I know you guys @rimrockcapital know your Powershell, so I’ve added comments on the script to make it self-explanatory. Still, if you have any questions about it let me know.