Current Build Version From TeamCity API

Good Morning!

I would like to use the TeamCity REST API to get the current build version like is shown here:

TeamCity Build Version.png
I am able to get to that specific build with this query:

<buildUri>/app/rest/buildTypes/DNX_Platform_BusMonitor_Ci

I can't really see any setting, property, etc, that relates to this current build number. Is there a different API I should be using?

I am using TeamCity version "TeamCity Enterprise 8.1.2 (build 29993)".

Thanks,
Derek

3 comments
Comment actions Permalink

Hi Derek,

The request that you posted return the info about build configuration, not exact build.
You can use the following request to get the number of the build:

http://teamcity:8111/httpAuth/app/rest/builds/buildType:<buildConfigurationId>/number
1
Comment actions Permalink

Thanks, Alina! This is exactly what I needed.

--Derek

0
Comment actions Permalink

Hi,

How can I get a list of build numbers?

0

Please sign in to leave a comment.