-2

I am trying to Get a RD and then call a PUT operation on the release object after updating some Variables in it. The PUT operation is successful, the variables get updated in the RD, but all the other phases in the environment gets removed, except the 1st phase. My RD has only one env I have not tried with more than one ENV for this operation.

Please suggest how can I update the RD through Rest call without loosing data.

URLs tried for GET: The below URL don’t give Deployphases but PUT is successful with deleted phases https://xxxxxxx.vsrm.visualstudio.com/xxxxxxx/_apis/Release/definitions/2016?api-version=4.1-preview.1

The below URL gives Deployphases but PUT fails with error that Deployphases should not be used rather Deploy step should be used. https://xxxxxxx.vsrm.visualstudio.com/xxxxxxx/_apis/Release/definitions/2016

URLs tried for PUT: behavior is same for both the URLs https://xxxxxxxx.vsrm.visualstudio.com/xxxxxxx/_apis/Release/definitions?api-version=4.1-preview.1

https://xxxxxxxx.vsrm.visualstudio.com/xxxxxxx/_apis/Release/definitions/2016?api-version=4.1-preview.1

1 Answers1

0

It's not a bug, you should use api-version=4.0-preview.3:

https://xxxx.vsrm.visualstudio.com/xxxx/_apis/Release/definitions?api-version=4.0-preview.3

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39