Hey,
I am trying to create a script to automatically update the branch of a set of build definitions but currently testing it out with Postman with the API.
I tried changing the branch variable on an existing build instance and that worked just fine but when I tried to change it on a build definition since we want to run a new build with the changed branch, I am getting
{
"count": 1,
"value": {
"Message": "The requested resource does not support http method 'PATCH'."
}
}
Does the build definition not have anyway to update the data thru API?
I am calling to https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{idName}?api-version=5.1
On the documentation for updating Definition (https://learn.microsoft.com/en-us/rest/api/azure/devops/build/definitions/update?view=azure-devops-rest-5.1)
The example here is using PUT but that seem like it'll have a bigger room of error needing to overwrite the whole configuration.
Any help would be much appreciated. Thanks!