How to view running personal builds by a particular user via TeamCity API

Using this as my reference - http://confluence.jetbrains.net/display/TW/REST+API+Plugin

So far I have the following

http://teamcity:8111/httpAuth/app/rest/builds?locator=running:true,personal:true,user:username:foobar

Expected Results
A list of running personal builds by user foobar

Actual Results
A list of running personal builds

The documentation lists the following:

Build Locator

The list of supported build dimensions:

running:<true/false/any> - limit the builds by running flag.
personal:<true/false/any> - limit the builds by personal flag.
user:(<userLocator>) - limit the builds to only those triggered by user specified
....

Users

<userLocator> can be of a form:

    id:<internal user id> - to reference the user by internal ID
    username:<user's username> - to reference the user by username/login name

I have also tried

http://teamcity:8111/httpAuth/app/rest/builds?locator=running:true,personal:true,user:foobar
http://teamcity:8111/httpAuth/app/rest/builds?locator=running:true,personal:true,username:foobar

Is there something I am missing to get it to filter by a particular user also?

Thank you for your time

5 comments
Comment actions Permalink

Seems to be more questions than answers on these boards. I thought JetBrains would have a few qualified techs ensuring some kind of response for users of their products. Of the last 50 posts 58% have 0 response?

0
Comment actions Permalink

Hi Paul,

The URL you mentioned initially works fine for me listing runnning personal builds of the user with the specified username.
I tried it with TeamCity 7.1.2.

The correct synatax is ...user:(username:foobar) instead of  ...user:username:foobar, but both actually work for me.

What TeamCity version do you use?

Does the request "http://teamcity:8111/httpAuth/app/rest/builds?locator=personal:true,user:(username:foobar)" also list wrong builds?

0
Comment actions Permalink

Thanks for the follow up :)

My TC version is TeamCity Enterprise 6.5.5 (build 18087)

and I always get

<builds count="0"/>

as a response for any user I request for even when their person build is clearly building.

I tried adding the parentheses to my URL as you advised but the result was the same. Is there at v6.5* version of this syntax to accomplish same?

0
Comment actions Permalink

Hi Paul,

> My TC version is TeamCity Enterprise 6.5.5 (build 18087)

That's probably the reason. Frankly, 6.5.5 was more then a year ago so I do not have any advice on hand and not sure if there is an older syntax for the case.

Do you plan to upgrade (aprat from fixes there also were lots of improvements).

If you do not plan to upgrade and deinitely need this to work, please let me know, I will try to check the state of this in 6.5.5 as time permits.

0
Comment actions Permalink

Hi Yegor,

Unfortunately we are not in a position to upgrade at the moment. I appreciate your offer to check the state of this in TC 6.5.5 when time allows. It'd be great if I could get this to work.

Thanks,
Paul

0

Please sign in to leave a comment.