REST API: can I query for last build with a particular artifact?

i would like to find the latest build on a particular branch that has an artifact called

Is this possible?

Comment actions Permalink

Hi Marc,

No, it's not possible. You can create a build script, that:

  1. requests the list of builds on particular branch
  2. iterates over the list of returned builds and requests the list of artifacts for each one:

          GET http://teamcity:8111/httpAuth/app/rest/builds/


        Stops and returns the build locator if coverage.xml is found.

Why do you need to find such builds using REST API?
Comment actions Permalink

Hi again,

The second approch is available. Since TeamCity 9.1.x you can use the following request:


This request returns the list of all builds, but builds that contain requested artifact have the following pattern:

     <file name="<build_artifact>"/>

Please sign in to leave a comment.