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 the latest 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.

...

Note: If the value contains the "," symbol, it should be enclosed into parentheses: "(<value>)". The value of a dimension can also be encoded as Base64url and sent as "<dimension>:($base64:<base64-encoded-value >)" instead of " <dimension>: <value>".

Examples:

http://teamcity:8111/app/rest/projects gets you the list of projects
http://teamcity:8111/app/rest/projects/<projectsLocator> http://teamcity:8111/app/rest/projects/id:RESTAPIPlugin  (the example id is used) gets you the full data for the REST API Plugin project.
http://teamcity:8111/app/rest/buildTypes/id:bt284/builds?locator=<buildLocator> - http://teamcity:8111/app/rest/buildTypes/id:bt284/builds?locator=status:SUCCESS,tag:EAP - (example ids are used) to get builds
http://teamcity:8111/app/rest/builds/?locator=<buildLocator> - to get builds by build locator.

Supported HTTP Methods

  • GET: retrieves the requested data. e.g. usually .../app/rest/entities retrieves list of entities, .../app/rest/entities/<entity locator> retrieves single entity
  • POST: creates the entity in the request adding it to the existing collection. When posting XML, be sure to specify the "Content-Type: application/xml" HTTP header. e.g. to create a new entity one regularly needs to post single entity data to .../app/rest/entities URL
  • PUT: based on the existence of the entity, creates or updates the entity in the request. e.g. supported for some entities, for URLS like .../app/rest/entities/<entity locator>
  • DELETE: removes the requested data e.g. for .../app/rest/entities/<entity locator> URL

Response Formats

The TeamCity REST APIs returns HTTP responses in the following formats according to the HTTP "Accept" header:

...