Symptoms
- The following REST API request is used to get the status icon of a specific build:
GET /app/rest/builds/id:<BUILD_ID>/statusIcon - After updating TeamCity to 2026.1.4 or later, the status icon is not shown. The
internal errormessage is displayed instead. -
teamcity-rest.loghas the following entries:Status icon locator validation rejected a locator at path 'build.id' (context 'BUILD', reason: unsupported dimension)
Cause
This behavior was introduced as part of a security fix.
The status icon endpoint now validates locators against a safe allowlist; top-level build id is excluded.
Resolution
The following internal property can be added to allow using build IDs in the build locator for the status icon endpoint:
rest.buildRequest.statusIcon.locatorValidation.additionalAllowedDimensions=id
Alternatively, to get the status icon for a specific build, the following request may be used:
GET /app/rest/builds/buildType:(id:<BUILD_TYPE_ID>),number:<BUILD_NUMBER>/statusIcon
In the above example, the build is located not by the build ID, but by the build configuration ID and the build number. Note: The above request may not return status icons for running or canceled builds, as the build number may not always be available in those cases.
Additional information
StatusIcon REST API endpoint doesn't allow using the build ID in the buildLocator anymore
Comments
0 comments
Please sign in to leave a comment.