Get Build Status Icon
This article lists REST API requests concerning build status icons.
An |
GET http://<TeamCity Server host>:<port>/app/rest/builds/<buildLocator>/statusIcon.svg
|
A |
GET http://<TeamCity Server host>:<port>/app/rest/builds/<buildLocator>/statusIcon
|
Icon that represents build status for several builds (since TeamCity 10.0) |
|
Example request:
For project with the PROJECT_ID ID:
For all active branches in a build configuration with the BUILD_CONF_ID ID:
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:
Status of the last build tagged with the myTag tag:
![]()
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 https://teamcity.jetbrains.com with guest authentication enabled:
If the returned image contains "no permission to get data" text (
), 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.