Unable to render embedded object: File (TeamCity48.png) not found.

TeamCity 10.x and 2017.x Documentation

Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.x documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The TeamCity server supports basic HTTP authentication allowing users 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 the valid TeamCity server username and password to authenticate using use basic HTTP authentication. The Appropriate user should have appropriate permissions  are required to perform the actions.

Info

You may want to configure the server to use HTTPS as username and password are passed in insecure form during basic HTTP authentication.

To force using a basic HTTP authentication instead of redirecting to the login page if no credentials are supplied, prepend a path in the usual TeamCity URL with "/httpAuth". For example:

Code Block

http://teamcity.jetbrains.com:8111/httpAuth/action.html?add2Queue=MyBuildConf

...

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:

Code Block

http://teamcity.jetbrains.com:8111/guestAuth/action.html?add2Queue=MyBuildConf

...

Some tools (for example, Wget) support the following syntax for the basic HTTP authentication:

Code Block

http://<user name>:<user password>@<server address>/httpAuth/action.html?add2Queue=<build configuration Id>

Example:

Code Block

http://testuser:testpassword@teamcity.jetbrains.com:8111/httpAuth/action.html?add2Queue=MyBuildConf

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:

Code Block

http://teamcity.jetbrains.com:8111/agentDetails.html?id=2

To trigger a build on two agents at the same time, use the following URL:

Code Block

http://testuser:testpassword@teamcity.jetbrains.com:8111/httpAuth/action.html?add2Queue=MyBuildConf&agentId=1&agentId=2

To trigger a build on all enabled and compatible agents, use "allEnabledCompatible" as agent ID:

Code Block

http://testuser:testpassword@teamcity.jetbrains.com:8111/httpAuth/action.html?add2Queue=MyBuildConf&agentId=allEnabledCompatible

...

To trigger a build on a specific change inclusively, use the following URL:

Code Block

http://testuser:testpassword@teamcity.jetbrains.com:8111/httpAuth/action.html?add2Queue=MyBuildConf&modificationId=11112

...

To trigger a build with custom parameters (system properties and environment variables), use:

Code Block

http://testuser:testpassword@teamcity.jetbrains.com:8111/httpAuth/action.html?add2Queue=MyBuildConf&name=<full property name1>&value=<value1>&name=<full property name2>&value=<value2>

...

To run a build on a feature branch:

Code Block

http://testuser:testpassword@teamcity.jetbrains.com/httpAuth/action.html?add2Queue=bt10&branchName=master