Teamcity REST API not showing all of the pinned builds

Hello,

I am trying to get all pinned builds using TeamCity REST API, and the result set doesn't match actual number of pinned builds.
For example, total number of pinned builds I got from 'history' table with condition PIN=1.

Here is what I've tried with REST API
http://TCserver:8111/httpAuth/app/rest/builds/?locator=pinned:true
http://TCserver:8111/httpAuth/app/rest/builds/?locator=pinned:true,project:<id of project> , and for the certain project result set is zero, but there are pinned builds.

We are using TeamCity Enterprise 8.1.2 (build 29993).

Anyone else experience the same ? Any help or suggestion is more than welcome.
Thank you.

Regards,
Milan Stakic

4 comments

Hi Milan,

By default only builds from the default branch are returned. To retrieve all builds, add the following locator:

 branch:default:any. Does it help?
0

Hello Alina,

Indeed, it helped to get additional pinned builds ( from 48 up to 100 ).
Unfortunatelly, still I need more pinned builds in the output.
Do you think this 100 is some kind of limit for xml output ?

Thank you.

Regards,
Milan Stakic

0

You correctly used count locator, it limits the number of builds returned builds.
Glad it works for you!

0

Please sign in to leave a comment.