Using a locator in build-related requests, you can filter the builds to be returned in the build-related requests. It is referred to as "build locator" in the scope of REST API.
By default, only finished, not canceled, not failedToStart not personal builds from default branch are returned. TO return all build, use "defaultFilter:false" dimension.
Examples of supported build locators:
The list of supported build locator dimensions:
buildType:(<buildTypeLocator>) - only the builds of the specified build configuration
tags:<tags> - ","(comma) - a delimited list of build tags (only builds containing all the specified tags are returned)
status:<SUCCESS/FAILURE/ERROR> - list builds with the specified status only
user:(<userLocator>) - limit builds to only those triggered by the user specified
personal:<true/false/any> - limit builds by the personal flag. By default, perfsonal builds are not included.
canceled:<true/false/any> - limit builds by the canceled flag. By default, canceled builds are not included.
failedToStart:<true/false/any> - limit (since TeamCity 9.1) limit builds by the failed to start flag (since TeamCity 9.1). By default, canceled builds are not included.
running:<true/false/any> - limit builds by the running flag. By default, running builds are not included.
pinned:<true/false/any> - limit builds by the pinned flag.
agentName:<name> - agent name to return only builds ran on the agent with name specified
sinceBuild:(<buildLocator>) - limit the list of builds only to those after the one specified
sinceDate:<date><date> - limit the list of builds only to those started after the date specified. The date should be in the same format as dates returned by REST API (e.g. "20130305T170030+0400").
project:<project locator>locator> - limit the list to the builds of the specified project (belonging to any build type directly under the project).Before Before TeamCity 9.1 this 1 this traversed projects recursively: with meaning "belonging to any build type directly or indirectly under the project".
affectedProject:<project locator>locator> - - (since TeamCity 9.1) limit limit the list to the builds of the specified project (belonging to any build type directly or indirectly under the project)
count:<number><number> - serve only the specified number of builds
start:<number><number> - list the builds from the list starting from the position specified (zero-based)
lookupLimit:<number><number> - limit processing to the latest N builds only. If none of the latest N builds match the other specified criteria of the build locator, 404 response is returned.
Basic build for a build configuration:
<build> <buildType id="buildConfID"/> </build>