Branch name format to get StatusIcon

I am able to access the status icon for a particular build as follows:

http://<URL>/httpAuth/app/rest/builds/buildType:Platform_Site_1PackageTest/statusIcon

However, I would like to get the statusIcon for a particular git branch within a build configuration. I've tried the following:

http://<URL>/httpAuth/app/rest/builds/buildType:Platform_Site_1PackageTest,branch:DEV-8446-Inventory/statusIcon
http://<URL>/httpAuth/app/rest/builds/buildType:Platform_Site_1PackageTest,branch:refs/heads/DEV-8446-Inventory/statusIcon
http://<URL>/httpAuth/app/rest/builds/buildType:Platform_Site_1PackageTest,branch:name:(refs/heads/DEV-8446-Inventory)/statusIcon
http://<URL>/httpAuth/app/rest/builds/buildType:Platform_Site_1PackageTest,branch:(refs/heads/DEV-8446-Inventory)/statusIcon

In the first case, I get a "not found" status icon and in all other cases, I get the error:

Error has occurred during request processing (Not Found).
Error: com.sun.jersey.api.NotFoundException: null for uri: http://<URL>/app/rest/builds/buildType:Platform_Site_1PackageTest,branch:refs/heads/DEV-8446-Inventory/statusIcon
Please check URL is correct.

I think the issue is caused by the slashes in the branch names (refs/heads/DEV-8446-Inventory). What is the correct format to pass branch names, particularly ones with slashes in them?
4 comments

Hello,

This is a known limitation of the default Tomcat configuration. Please watch/vote for the issue https://youtrack.jetbrains.com/issue/TW-19360 and see the comment for available workarounds.

0

I'm attempting to use the workaround but without success.

A file called internal.properties containing the two Tomcat server properties was added in C:\ProgramData\JetBrains\TeamCity\config and the machine restarted.

I'm getting the same behavior and errors as before.

Can I also get verification on what is the correct format for getting the status icon for the latest build of a specific branch on a specific build configuration (with a branch name such as refs/heads/Hotfix-Add-Logging).

0

Please add these parameter as JVM options. After adding them the following request works for me:
http://localhost:8111/httpAuth/app/rest/builds/buildType:<buildConfId>,branch:refs%2Fhead%2Fmaster/statusIcon

0

We have TeamCity running as a Windows service. The JVM options mentioned have been added as System environment variables:
Variable: TEAMCITY_SERVER_OPTS
Value: -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true;-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true

After restarting the machine, I'm getting a blank page with HTTP status code of 400 Bad Request for requests such as this:
http://localhost/httpAuth/app/rest/builds/buildType:Platform_Site_1PackageTest,branch:refs%2Fheads%2FDEV-9909-tdds-adobe-site-catalyst/statusIcon

Thank you for your support in attempting to resolve this.

0

Please sign in to leave a comment.