TeamCity 2021.1 Help

Get Project Details

This article contains use cases related to retrieving project details via TeamCity REST API:

  • Get a list of projects on a server or details of a specific project.

  • Get build configurations/templates under a specific project.

  • Get a list of project features.

List Projects

To get a list of all projects on the server, use:

GET http://<TeamCity Server host>:<port>/app/rest/projects

The server will respond with a Projects entity containing up to 100 recent Project entities.
The endpoint response is paginated. Use nextHref or prevHref properties of Projects to navigate the response pages. Alternatively, you can control which projects are returned with the count (number of returned projects) and start (position of the first returned project) dimensions:

GET http://<TeamCity Server host>:<port>/app/rest/projects?locator=count:10,start:15

In this example, the request will return 10 projects starting from the 15th element in the collection.

Get Project Details

To get a specific project, use:

GET http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>

The projectLocator parameter is a locator string typed as ProjectLocator. For example, to retrieve a project with the ID MyCustomProject, use:

GET http://<TeamCity Server host>:<port>/app/rest/projects/id:MyCustomProject

The call returns an entity of Project (or an exception if the project has not been found).

List Build Configurations of Project

This call will return a list of nested build configurations of the project found under projectLocator:

GET http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/buildTypes

The type of response is BuildTypes.

List Build Templates of Project

This call will return a list of nested build templates of the project found under projectLocator:

GET http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/templates

A build template is a special case of a build configuration, so the response type is also BuildTypes.

List Project Features

To get the project features associated with a project, use:

GET http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/projectFeatures

The type of response is ProjectFeatures.

Last modified: 14 October 2021