1 Replies Last post: Sep 9, 2013 2:47 PM by Pavel Sher  
Chris McKenzie Newbie 5 posts since
Sep 6, 2013
Currently Being Moderated

Sep 6, 2013 3:05 AM

Teamcity REST API get latest successful build on a branch

I'm using git flow with teamcity as my CI server. I'd like to pull artifacts from the latest successful build on a particular branch.

I can use this url to get the latest build on a branch: http://$teamcity$/httpAuth/app/rest/buildTypes/name:$BuildTypeName$/builds/branch:name:$branchName$

but it fails if the branch name contains '/' (e.g., git flow names branches 'feature/%' and 'release/%').

I've tried url encoding the '/'. For example, if $branchName$> == 'release/branchName' I use /builds/branch:name:release%2F$branchName$).

  • works - /builds/branch:name:develop
  • fails - /builds/branch:name:release%2F$branchName$.

I don't get an api error, but the api result is empty.

Pavel Sher JetBrains 2,387 posts since
Mar 6, 2008

More Like This

  • Retrieving data ...