Getting changes for last successful build via REST API

I am trying to make request to get changes for last successful build.

I was hoping something like this was possible:
http://myteamcity/httpAuth/app/rest/changes?buildType:(id:xxx)&build=lastSuccessful
but it is not :(

Then I see that the application.wadl for the API call "changes" contains an "changeLocator", but I cannot see it documented somewhere.

Could someone point me in the right direction? Like maybe to the source code of the plugin. Maybe it's possible to understand it from there....

The doc seems a bit short on this: http://confluence.jetbrains.com/display/TW/REST+API+Plugin

3 comments

It's been a while since the question, but I'd still answer now:

You were almost right. in the current version of TeamCity you can use URL like:

http://myteamcity/httpAuth/app/rest/changes?locator=buildType:(id:XXX),build:(buildType:(id:XXX),status:SUCCESS)

Also check a related question which has some hints.

0

Is it possible to get a list of the changes from a particular build?

I have tried:

/httpAuth/app/rest/changes?locator=build:(id:1128)

but it just returns

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><changes count="0" href="/httpAuth/app/rest/changes?locator=build:(id:1128)"/>

Note, theses are not pending changes that im looking for, its changes for a particular build but it doesnt seem to be working. Any suggestions?

Thank you!

0

Theo,

The URL you noted should indeed return changes for the build. The URL is noted in the "changes" node of the build's details retrieved via REST.
Seems like build with id 1128 has no "own" changes in your case. If this is not what you see in UI please post the screenshots and the REST request details in a separate thread.

0

Please sign in to leave a comment.