Using Octopus REST API to fix Steps parameters

I have a step used in ~200 Projects. I did not populate all the parameters and now I can no longer update all those Projects which use that step UNLESS I update the parameter values.

I have used the REST API to add a new step to a project but I want to find the offending step and create the properties which are missing for each one.

Found a code sample at OctopusDeploy-Api/UpdateInDeploymentProcesses.ps1 at master · OctopusDeploy/OctopusDeploy-Api · GitHub

which did this:


Method invocation failed because [System.Management.Automation.PSCustomObject] does not contain a method named ‘Add’.
At line:1 char:1

  • $steps[2]“WebsiteName”,“xx”)
  •   + CategoryInfo          : InvalidOperation: (Add:String) [], ParentContainsErrorRecordException
      + FullyQualifiedErrorId : MethodNotFound

Is there a way to do this within the REST API or using the Octopus Client?

Hey @terry_ninnis,

Thanks for reaching out.

Just to confirm so I am approaching this from the right angle, you have a step in 200ish projects that all need to get updated in the same way. What in particular are you updating? Are these steps part of a step template, or standalone? If it’s part of a step template, I am assuming you are being warned that Octopus can’t manually update the steps?

Please let me know.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.