We give our builds unique build numbers, that include a timestamp and a git commit. Given one of these build numbers (and no other information), I want to find the build configuration that built it.
If I type the build number into the "Search" box in the upper right corner, it works fine, listing the build and noting:
1 build found (matches in build number — 1) in 662ms
How do I access the same information via the REST API? I have checked the API docs, but can't see a call equivalent to the generic "Search" exposed in the UI. Alternatively, I'd like to directly fetch the Build details and/or Build Configuration (http://teamcity:8111/httpAuth/app/rest/buildTypes) via build number alone, but although there is a number: locator, it can only be used in conjunction with buildType: (which is exactly the information I'm trying to identify).
Try build requests with build number locator in TeamCity REST API.
We're using API method in PS script to retrieve builds by id like this:
So i think you should be able to do similar with "number" locator: