TeamCity 2021.1 Help

Get Build Status Icon

This article lists REST API requests concerning build status icons.

An .svg icon (recommended)

GET http://<TeamCity Server host>:<port>/app/rest/builds/<buildLocator>/statusIcon

A .png icon

GET http://<TeamCity Server host>:<port>/app/rest/builds/<buildLocator>/statusIcon.png

Icon that represents build status for several builds

GET request and strob build locator dimension.

Example request:

For project with the PROJECT_ID ID:

GET http://<TeamCity Server host>:<port>/app/rest/builds/aggregated/strob:(buildType:(project:(id:PROJECT_ID)))/statusIcon

For all active branches in a build configuration with the BUILD_CONF_ID ID:

GET http://<TeamCity Server host>:<port>/app/rest/builds/aggregated/strob:(branch:(buildType:(id:BUILD_CONF_ID),policy:active_history_and_active_vcs_branches),locator:(buildType:(id:BUILD_CONF_ID)))/statusIcon

For request /app/rest/builds/aggregated/<build locator> the status is calculated by list of the builds: app/rest/builds?locator=<build locator>. This allows embedding a build status icon into any HTML page with a simple img tag:

For build configuration with the BUILD_CONF_ID ID:

Status of the last build:

<img src="http://<TeamCity Server host>:<port>/app/rest/builds/buildType:(id:BUILD_CONF_ID)/statusIcon"/>

Status of the last build tagged with the myTag tag:

<img src="http://<TeamCity Server host>:<port>/app/rest/builds/buildType:(id:BUILD_CONF_ID),tag:myTag/statusIcon"/>


All other build locators are supported.

For example, you can use the following markdown markup to add the build status for GitHub repository for the build configuration with ID TeamCityPluginsByJetBrains_TeamcityGoogleTagManagerPlugin_Build and server with guest authentication enabled:

[![Build status](](

If the returned image contains "no permission to get data" text (no-permission-to-get-data.svg ), ensure that one of the following is true:

  • The server has the guest user access enabled, and the guest user has permissions to access the build configuration referenced, or

  • The build configuration referenced has the "enable status widget" option ON.

  • You are logged in to the TeamCity server in the same browser and you have permissions to view the build configuration referenced. Note that this will not help for embedded images in GitHub pages as GitHub retrieves the images from the server side.

Last modified: 11 May 2021