Build tagging progamatically by http

The build tagging feature ( is great.

However I want my deployments to automatically tag the fact that a build has been deployed to a particular environment.  The deployment script knows the build number and can talk http to the TeamCity server.

Is there a URL like those described at which I can hit to cause a tag to be associated with a particular build?

Comment actions Permalink

This feature is not documented but you can try the following HTTP request:
/httpAuth/ajax.html?setLabelForBuild=<build id>&labelName=<tag name>&labelingRootsManual[<vcs root id>]=true&labelingRootsManual[<vcs root id>]=true

This will tag build with specified id (<build id>) using the tag <tag name>. Tag will be set for VCS roots with specified ids (see <vcs root id>).

Comment actions Permalink

Thanks Pavel.

However, I don't want to tag the VCS roots - I just want to apply a TeamCity tag, which shows up on the build history page.

In the GUI I'd set this by finding the build on the list, hovering over the down arrow next to "None" on the Tags column, clicking [Edit] then typing / picking the tags from the javascript box that appears, and clicking save.

Is there an action.html request to do this?

Comment actions Permalink

Ok, then another undocumented HTTP request

/httpAuth/ajax.html?editTagsForBuild=<build id>&buildTagsInfo=<comma separated tags>


Please sign in to leave a comment.