Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one list the changes via the API from a TeamCity build?

Tags:

rest

teamcity

api

I'm trying to find a way to get all the comments from a particular build in TeamCity via the Rest API. How can one do that?

like image 409
mumbles Avatar asked Aug 26 '14 21:08

mumbles


People also ask

How do I check my TeamCity build history?

To view the history of builds in the current configuration, click previous and next links in the upper right corner of Build Results. Click All history link to open the History tab.

What is build locator in TeamCity?

BuildLocator Last modified: 21 September 2022. Represents a locator string for filtering Build entities. Examples: id:1 — find build with ID 1 .

How do I run a TeamCity build?

To run a custom build with specific changes, open the build results page, go to the Changes tab, expand the required change, click the Run build with this change, and proceed with the options in the Run Custom Build dialog. Use HTTP request or REST API request to TeamCity to trigger a build.


1 Answers

http://teamcity:port/httpAuth/app/rest/changes?locator=build:(id:77651)&fields=count,change:(version,username,date,href,comment,files)

Via this URL, one can list out in custom fashion exactly the fields they wish to return. I don't think this is documented, i got this from their support folks. Enjoy!

PS - There are other examples out there which iterate over each change, this lists out all the changes for a particular build id in one place, for parsing.

like image 60
mumbles Avatar answered Sep 30 '22 20:09

mumbles