Reputation: 153
I'm trying to run a PUT request using Postman to change the retention rules of a specific build definition, in Azure DevOps, and change the daysToKeep value.
But I keep getting the error: "The request specifies pipeline ID 1722 but the supplied pipeline has ID 0."
Any idea where do I go wrong?
Upvotes: 2
Views: 1096
Reputation: 153
In order to change\update any parameter on the build definition, first run a GET request. The result JSON output should be used as the body for the PUT request. Use this body and change\update the relevant parameter(s) you need... It is very important to increase the "revision" parameter, located in the root of the JSON output, in 1. (for example, if current is 97, for next run it should be 98).
Special thanks to Tinxuanna for directing me to this solution!
Upvotes: 2
Reputation: 230
@ShaiO Please take a look at this link List pipelines Azure DevOps. It may help you because it gets a list of the pipelines.
Then you can create a pipeline following the documentation.
Upvotes: 0