Reputation: 31
How can I get total number of builds that have run in a particular teamcity project? I understand there is autoincrementor plugin but to use this I will need to configure all the old projects.
I am looking of a REST API in teamcity, if that can give me total number of builds for even a build configuration then I can get project total by adding up all the numbers for build configurations under a project.
Thanks Pratibha
Upvotes: 1
Views: 2137
Reputation: 9392
http://teamcity:8111/httpAuth/app/rest/builds/
This will return xml like:
<builds count="100" .....>
<build id="1" .....
.....
....
</builds>
count is what you are looking for. If you are looking for builds in a project, you can use
http://teamcity:8111/httpAuth/app/rest/projects/<ProjectLocator>/buildTypes
This will give you something like:
<buildTypes>
<buildType id="1" ... />
<buildType id="2" ... />
</buildTypes>
There is no count attribute here, you'll need to count the list.
Upvotes: 1