TeamCity REST API Reference 2024.03 Help

Get Build Status Icon

In this article, we explore methods available for build status icons (such as Badge build successful or Badge build failed).

Get Status Icon for Specific Build

To get an .svg icon (recommended approach), use:


where buildLocator is a BuildLocator entity.

To get a .png icon, use:


Get Status Icons for Multiple Builds

To get status icons of multiple builds, use the /app/rest/builds/aggregated endpoint and the strob locator dimension.

For example, to get an icon summarizing build statuses under the MyProject project, use:


For an icon representing the latest builds on active branches of the MyBuildConfiguration configuration, use:


Get Icon for Latest Tagged Build

To fetch an icon of a MyBuildConfiguration build tagged with the MyTag tag, use:


Get Icon for Build Run on Specific Branch

To get a status icon of a MyBuildConfiguration build run on the MyBranch branch, use:


Display Build Status in GitHub Readme

If guest access is enabled on your TeamCity server, you can use the following markup to display the status of the TeamCityPluginsByJetBrains_TeamcityGoogleTagManagerPlugin_Build build configuration in your GitHub repository README:

[![Build status](](https://<teamcity_server_address>/viewType.html?buildTypeId=TeamCityPluginsByJetBrains_TeamcityGoogleTagManagerPlugin_Build)


If the returned image contains the "no permission to get data" text (no-permission-to-get-data.svg), check the following:

  • 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.

Last modified: 27 March 2024