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 the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.


Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: related to https://youtrack.jetbrains.com/issue/TW-29236


  • Make root REST API URL configurable (e.g. allow to specify alternative for "app/rest/<version>" part of the URL). This will allow to direct the client to another version of API if necessary.
  • Ignore (do not error out) item's attributes and sub-items which are unknown to the client. New sub-items are sometimes added to API without version change and this will ensure the client is not affected by the change.
  • Set large (and make them configurable) request timeouts. Some API calls can take minutes, especially on a large server.
  • Use HTTP sessions to make consecutive requests (use TCSESSIONID cookie returned from the first authenticated response instead of supplying raw credentials all the time). This saves time on authentication which can be significant for external authentication providers.
  • Beware of partial answers when requesting list of items: some requests are paged by default. If necessary, read and process "nextHref" attribute of the response entity for items collections. Related locator dimensions are "count" and "lookupLimit". 
  • Do not abuse ability to execute automated requests for TeamCity API: do not query API too frequently and restrict the data requested to only that necessary (using due locators and specifying necessary fields). Check the server behavior under load from your requests. Make sure not to repeat the request frequently if it takes time to process the request.

TeamCity Licensing Information Requests

Since TEamCity 10:
Licensing information: GET http://teamcity:8111/httpAuth/app/rest/server/licensingData

List of license keys: GET http://teamcity:8111/httpAuth/app/rest/server/licensingData/licenseKeys
License key details: GET http://teamcity:8111/httpAuth/app/rest/server/licensingData/licenseKeys/<license_key>
Add license key(s): 
POST text/plain newline-delimited keys to http://teamcity:8111/httpAuth/app/rest/server/licensingData/licenseKeys
Delete a license key: DELETE http://teamcity:8111/httpAuth/app/rest/server/licensingData/licenseKeys/<license_key>

TeamCity Data Entities Requests


List of projects: GET http://teamcity:8111/httpAuth/app/rest/projects
Project details: GET http://teamcity:8111/httpAuth/app/rest/projects/<projectLocator>
<projectLocator> can be id:<internal_project_id> or name:<project%20name>

List of Build Configurations: GET http://teamcity:8111/httpAuth/app/rest/buildTypes
List of Build Configurations of a project: GET http://teamcity:8111/httpAuth/app/rest/projects/<projectLocator>/buildTypes
List of templates for a particular project: http://teamcity:8111/httpAuth/app/projects/<projectLocator>/templatestemplates.
List of all the templates on the server: http://teamcity:8111/httpAuth/app/rest/buildTypes?locator=templateFlag:true

Build Configuration/Template details: GET http://teamcity:8111/httpAuth/app/rest/buildTypes/<buildTypeLocator><buildTypeLocator>

Build Configuration Locator