1

I'm trying to run a request through the TFS REST API v2.0 because I would like to be able to modify the 'ProcessParameters' of a specific BuildDefinition before triggering it. This is so I can pass an argument to the specific BuildDefinition's deployment script.

Doing this work through the TFS SDK works fine, but I've had to refactor to use the REST API instead because this has to run on a production machine without Visual Studio and TFS Team Explorer.

The documentation says I should be able to specify a propertyFilter in my query, but I'm unable to get it to return more information. What I am getting is very light compared to what I'm used to working through the SDK.

Here is my request: https://{instance}/DefaultCollection/{project}/_apis/build/definitions/{id}?api-version=2.0&propertyFilters=processParameters

The response is exactly the same whether or not the "&propertyFilters=processParameters" part is set. It should be able to handle a comma-delimited list of property names but seemingly it is just ignored.

Have I found a bug, or shall we say, a discrepancy between the API documentation and the actual API? Is the 'propertyFilters' query parameter actually implemented? I can't get it to work...

Any help is highly appreciated!

Community
  • 1
  • 1
Thomas Elstrøm
  • 81
  • 1
  • 1
  • 6

1 Answers1

2

It seems that you are working with XAML build definition as vNext build definition does not have ProcessParameters. However, the RestAPI Build 2.0 is mainly designed for vNext build, it can only get some basic information for XAML build definition. That means, Rest API cannot achieve the features you want for now if you are working with XAML build definition. You have to install VS&Team Explorer and use TFS SDK to do it.

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60