Rest API request to view all builds (/httpAuth/app/rest/builds/) is not working correctly?

I am using the following get request '/httpAuth/app/rest/builds/'

It returns:

<builds count="16" href="/httpAuth/app/rest/builds/">
<build id="15856" buildTypeId="MasterAutomatedBuilds_Master" number="1363" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15856" webUrl="http://llama:8080/viewLog.html?buildId=15856&buildTypeId=MasterAutomatedBuilds_Master"/>
<build id="15855" buildTypeId="MediaRadarAutomatedBuilds_ProductionBugFixes" number="373" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15855" webUrl="http://llama:8080/viewLog.html?buildId=15855&buildTypeId=MediaRadarAutomatedBuilds_ProductionBugFixes"/>
<build id="15848" buildTypeId="MasterAutomatedBuilds_Master" number="1362" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15848" webUrl="http://llama:8080/viewLog.html?buildId=15848&buildTypeId=MasterAutomatedBuilds_Master"/>
<build id="15846" buildTypeId="MasterAutomatedBuilds_Master" number="1361" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15846" webUrl="http://llama:8080/viewLog.html?buildId=15846&buildTypeId=MasterAutomatedBuilds_Master"/>
<build id="15822" buildTypeId="MediaRadarAutomatedBuilds_ProductionBugFixes" number="372" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15822" webUrl="http://llama:8080/viewLog.html?buildId=15822&buildTypeId=MediaRadarAutomatedBuilds_ProductionBugFixes"/>
<build id="15818" buildTypeId="MediaRadarAutomatedBuilds_ProductionBugFixes" number="371" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15818" webUrl="http://llama:8080/viewLog.html?buildId=15818&buildTypeId=MediaRadarAutomatedBuilds_ProductionBugFixes"/>
<build id="15734" buildTypeId="MediaRadarAutomatedBuilds_Staging" number="448" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15734" webUrl="http://llama:8080/viewLog.html?buildId=15734&buildTypeId=MediaRadarAutomatedBuilds_Staging"/>
<build id="15715" buildTypeId="MediaRadarAutomatedBuilds_Staging" number="447" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15715" webUrl="http://llama:8080/viewLog.html?buildId=15715&buildTypeId=MediaRadarAutomatedBuilds_Staging"/>
<build id="15582" buildTypeId="MediaRadarAutomatedBuilds_Integration" number="14" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15582" webUrl="http://llama:8080/viewLog.html?buildId=15582&buildTypeId=MediaRadarAutomatedBuilds_Integration"/>
<build id="15554" buildTypeId="MediaRadarAutomatedBuilds_Integration" number="13" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:15554" webUrl="http://llama:8080/viewLog.html?buildId=15554&buildTypeId=MediaRadarAutomatedBuilds_Integration"/>
<build id="15553" buildTypeId="InternalAutomatedBuilds_InternalBranchBuilder" number="585" status="SUCCESS" state="finished" branchName="master" defaultBranch="true" href="/httpAuth/app/rest/builds/id:15553"webUrl="http://llama:8080/viewLog.html?buildId=15553&buildTypeId=InternalAutomatedBuilds_InternalBranchBuilder"/>
<build id="15551" buildTypeId="InternalAutomatedBuilds_InternalBuilder" number="729" status="SUCCESS" state="finished" branchName="master" defaultBranch="true" href="/httpAuth/app/rest/builds/id:15551"webUrl="http://llama:8080/viewLog.html?buildId=15551&buildTypeId=InternalAutomatedBuilds_InternalBuilder"/>
<build id="14765" buildTypeId="InternalAutomatedBuilds_InternalBuilder" number="474" status="SUCCESS" state="finished" branchName="master" defaultBranch="true" href="/httpAuth/app/rest/builds/id:14765"webUrl="http://llama:8080/viewLog.html?buildId=14765&buildTypeId=InternalAutomatedBuilds_InternalBuilder"/>
<build id="14697" buildTypeId="InternalAutomatedBuilds_InternalBranchBuilder" number="474" status="SUCCESS" state="finished" branchName="master" defaultBranch="true" href="/httpAuth/app/rest/builds/id:14697"webUrl="http://llama:8080/viewLog.html?buildId=14697&buildTypeId=InternalAutomatedBuilds_InternalBranchBuilder"/>
<build id="14694" buildTypeId="MasterAutomatedBuilds_NightlyIntegration" number="79" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:14694" webUrl="http://llama:8080/viewLog.html?buildId=14694&buildTypeId=MasterAutomatedBuilds_NightlyIntegration"/>
<build id="14666" buildTypeId="MasterAutomatedBuilds_NightlyIntegration" number="77" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:14666" webUrl="http://llama:8080/viewLog.html?buildId=14666&buildTypeId=MasterAutomatedBuilds_NightlyIntegration"/>

</builds>

The problem is that when I look at my TeamCity server I see a lot of builds that are not being returned by the above command.

This is what I see in TeamCity (attached image shows a better view of the whats in TeamCity):



Clearly, you can see that most of the builds seen in TeamCity are not showing up when using '/httpAuth/app/rest/builds/'

Am I not using the correct REST API call?  Or, is there something else missing?

Thanks in advance for any help.


Attachment(s):
TeamCityBuilds.png
2 comments
Comment actions Permalink

Hi Boris,

If build configuration utilizes feature branches then, by default, only builds from default branch are returned. To retrieve all builds, add the following locator: branch:default:any. The whole path will look like this: /httpAuth/app/rest/builds/?locator=branch:default:any

0
Comment actions Permalink

Thanks, That worked.

0

Please sign in to leave a comment.