I am trying to create a script that will run Rest APIs on Octopus Deploy to copy a Variable Set from one Octopus Deploy Space to another. To do this I need to run a POST to create the Variable Set (which seems to be fine). I then need to run a PUT operation on the Variables in the new Variable Set.
When I go to the swagger page, and find the put operation that says it “Updates a variable set” it does not have a parameter for the actual variables. (Just takes the space and an id.):
FYI: Looking at lines 190-193 of the AddOrEditVariablesWithScoping script it looks like that PUT operation expects a body that is not shown in the Swagger document (see my picture above).
Not sure if that is considered a bug, but it would have helped me out if it had shown that the body is expected and the format it expects.