Teamcity REST API - any way of searching issues / changes and see which build they were included in
I'm writing a little tool where you can input a JIRA ticket number and it displays which builds it was included in.
Right now the only way I managed to do something like this is to:
1) get a limited number of builds using: "{baseurl}/builds?locator=buildType:{buildType},branch:(unspecified:any),lookupLimit:35"
2) then check related issues in each build: "{baseurl}/builds/id:{buildId}/relatedIssues"
This seems to miss some builds for some reason when comparing the result with what you get using the normal search functionality. Also, it's a rather cumbersome way of checking if an issue is in a build.
I therefore wonder, is there any way of query the api so it returns a list of builds that contains a certain issue / change with a given issue number / text string?
Please sign in to leave a comment.
Hi,
for changes, we have a specific changes endpoint, if you find a change you can find its data: https://confluence.jetbrains.com/display/TCD18/REST+API#RESTAPI-Changes
For issues, I'm afraid you can only get them through the related builds directly.
I'd recommend substantially increasing the lookupLimit parameter. The parameter doesn't limit the amount of results returned, it limits the amount of total rows that will be searched through, so increasing it will likely increase the results you will get.