REST API fetch additional settings branchFilter for buildType

Hi Community,

is it possible to fetch the data by RESTApi regarding branchFilter setting on a specific buildtype ?

From the TeamCity Web-Interface for a buildType

Version Control Settings Page
Additional Options
branchFilter

from the DSL of the buildType:

 vcs { root(AbsoluteId("dummyVCSRoot")) 
 checkoutMode = CheckoutMode.ON_AGENT
branchFilter = """
-:refs/pull-requests/*
-:_*
"""
.trimIndent()
}

But I don't find a way to get this Information via TC RESTApi interface.

Thanks and Cheers!

2 comments
Comment actions Permalink

Hello!

You may use the following request:

/app/rest/buildTypes?locator=id:<build configuration ID>&fields=buildType(id,name,settings(*))

If Branch filter field is set to a non-default (+:*) value, it will appear under the settings node:

 <property name="branchFilter" value="+:feature"/>

Please let me know if this helps.

1
Comment actions Permalink

Hi Fedor,

Yes! It works like a charm. <3

Thanks alot for your help and Cheers!

0

Please sign in to leave a comment.