In addition to the commands described here, there is a REST API that you can use for certain operations.
The examples below assume that your server web UI is accessible via http://buildserver:8111/ URL.
The TeamCity server supports basic HTTP authentication allowing to access certain web server pages and perform actions from various scripts. Please consult the manual for the client tool/library on how to supply basic HTTP credentials when issuing a request.
Use valid TeamCity server username and password to authenticate using basic HTTP authentication. The user should have appropriate permissions to perform the actions.
To force using a basic HTTP authentication instead of redirecting to the login page if no credentials are supplied, prepend a path in usual TeamCity URL with "/httpAuth". For example:
The HTTP authentication can be useful when downloading build artifacts and triggering a build.
If you have Guest user enabled, it can be used to perform the action too. Use "/guestAuth" before the URL path to perform the action on Guest user behalf. For example:
To trigger a build, send the HTTP GET request for the URL: http://<server address>/httpAuth/action.html?add2Queue=<build type Id> performing basic HTTP authentication.
Some tools (for example, Wget) support the following syntax for the basic HTTP authentication:
You can trigger a build on a specific agent passing additional agentId parameter with the agent's Id. You can get the agent Id from the URL of the Agent's details page (Agents page > <agent name>). For example, you can infer that agent's Id equals "2", if its details page has the following URL:
To trigger a build on two agents at the same time, use the following URL:
To trigger a build on all enabled and compatible agents, use "allEnabledCompatible" as agent ID:
TeamCity allows you to trigger a build with customized parameters. You can select particular build agent to run the build, define additional properties and environment variables, and select the particular sources revision (by specifying the last change to include in the build) to run the build with. These customizations will affect only the single triggered build and will not affect other builds of the build configuration.
To trigger a build on a specific change inclusively, use the following URL:
modificationId — internal TeamCity server id which can be obtained from the web diff url.
To trigger a build with custom parameters (system properties and environment variables), use:
Where <full property name> is a full property name with system./env. prefix or no prefix to define configuration parameter.
To move build to the top of the queue, add the following to the query string
To run a personal build, add &personal=true to the query string.
To run a build on a feature branch:
Skip to end of metadata Go to start of metadata