Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: related to https://youtrack.jetbrains.com/issue/TW-46798

...

revision:<REVISION> - find builds by revision. The whole path is: , e.g. all builds of the given build configuration with the revision:  /httpAuth/app/rest/builds?locator=revision:(REVISION),buildType:(id:BUILD_TYPE_ID). See more information below.
agentName:<name> - agent name to return only builds ran on the agent with name specified

...

Code Block
<build>...
  <agent>
    <pool id="N"/>
  </agent>
...
</build>

 

Anchor
buildOnSpecificChange
buildOnSpecificChange
Build on a specified change, forced rebuild of all dependencies and clean sources before the build, moved to the build queue top on triggering. (Note that the change is set via the change's internal modification id; see more below):

Code Block
xml
xml
<build>
  <triggeringOptions cleanSources="true" rebuildAllDependencies="true" queueAtTop="true"/>
  <buildType id="buildConfID"/>
  <lastChanges>
    <change id="modificationId"/>
  </lastChanges>
</build>

...

Downloading build logs via a REST request is not supported, but there is a way to download the log files described here.

Changes

The <changes> tag is not included into the build by default, it has the href attribute only. If you execute the request specified in the href, you'll get the required changes.

Filter all changes by a locator: GET  http://teamcity:8111/app/rest/changes?locator=<changeLocator>

Supported locators:
id, project, buildType, build, vcsRoot, vcsRootInstance, username, user, version, internalVersion, comment, file, sinceChange, single value, start, count, lookupLimit

...

Note

Please note that the change id is the change's internal

...

id, not the revision. The id can be seen in the change node listed by the REST API or in the URL of the change details (as modId).

Get all changes for a project: GET http://teamcity:8111/app/rest/changes?locator=project:projectId

Get all the changes in a build configuration since a particular change identified by its id: http://teamcity:8111/httpAuth/app/rest/changes?locator=buildType:(id:buildConfigurationId),sinceChange:(id:changeId)

Anchor
pendingChange
pendingChange
Get pending changes for a build configuration  http://teamcity:8111/httpAuth/app/rest/changes?locator=buildType:(id:BUILD_CONF_ID),pending:true

Get the list of all of the changes included into the build: GET http://teamcity:8111/app/rest/changes?locator=build:(id:<buildId>)

Get details of an individual change: GET http://teamcity:8111/app/rest/changes/id:changeId
Get information about a changed file action : the files node lists changed files. Since TeamCity 10.0, the information about the changed file action is reported via the changeType attribute for the files listed as one of the following:  added, edited, removed, copied or unchanged.

lastChanges

The <lastChanges> tag contains information about the last commit included into the build (a single commit only). It also returns the TeamCity internal id (the id attribute) associated with the commit. The id can be useful when running a custom build on the same commit (see the example above).

Revisions

The <revisions> tag contains revisions of all of the VCS repositories associated with this build that will be checked out by the build on the agent.  If a build does not have its own VCS roots, but has snapshot dependencies and the option "Show changes from dependencies" is turned on, <revisions> can be empty but <changes> may still be returned.

Get all builds with the specified revision: http://teamcity:8111/app/rest/builds?locator=revision(version:XXXX)

 

Build problems

GET http://teamcity:8111/httpAuth/app/rest/problemOccurrences?locator=build:(BUILD_LOCATOR)

...