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.

...

The most frequently used values for "<buildTypeLocator>" are id:<buildConfigurationOrTemplate_id> and name:<Build%20Configuration%20name>.

Since TeamCity 2017.2, the type locator is supported with one of the values: regular, composite or deployment

Other supported dimensions are (these are in experimental state):
internalId - internal id of the build configuration
project - <projectLocator> to limit the build configurations to those belonging to a single project
affectedProject - <projectLocator> to limit the build configurations under a single project (recursively)
template - <buildTypeLocator> of a template to list only build configurations using the template
templateFlag - boolean value to get only templates or only non-templates
paused - boolean value to filter paused/not paused build configurations

Wiki Markup
{hidden-data}
compatibleAgent
compatibleAgentsCount
parameter
filterByBuilds
{hidden-data}

...

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

Anchor
Buildproblems
Buildproblems
 
Anchor
Tests
Tests
Tests and Build problems

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

Tests

List tests:
GET http://teamcity:8111/app/rest/testOccurrences?locator=<locator dimension>:<value>

 

Supported locators:

  • build:(<build locator>) - test run in the build

  • build:(<build locator>),muted:true - failed tests which were muted in the build

  • currentlyFailing:true,affectedProject:<project locator> - tests currently failing under the project specified (recursively)

  • currentlyMuted:true,affectedProject:<project locator> - tests currently muted under the project specified (recursively) - See also project's Muted Problems tab

...

Get invocations of a test:
GET http://teamcity:8111/app/rest/testOccurrences?locator=build:(id:XXX),test:(id:XXX)&fields=$long,testOccurrence($short,invocations($long))

List all test runs with all the invocations flattened:
GET http://teamcity:8111/app/rest/testOccurrences?locator=build:(id:XXX),test:(id:XXX),expandInvocations:true

Muted tests and build problems

List all muted tests and build problems GET http://teamcity:8111/app/rest/mutes

Unmute a test or build problems DELETE http://teamcity:81111/app/rest/mutes/id:XXXX

Mute a test or build problems POST to http://teamcity:8111/app/rest/mutesUse the same XML or JSON as returned by GET

Investigations

List investigations in the Root project and its subprojects: http://teamcity:8111/app/rest/investigations

...

Get investigations for a build configuration: http://teamcity:8111/app/rest/investigations?locator=buildType:(id:XXXX) 

Anchor
assignInvestigation
assignInvestigation
Since TeamCity 2017.2 EAP2 it 2 it is possible to assign/replace investigations: 

...