Manage Projects
This article lists REST API requests concerning projects.
Projects and Build Configuration/Templates Lists
| List of projects |
GET http://<TeamCity Server host>:<port>/app/rest/projects
|
| Project details |
GET http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>
where |
| List of build configurations |
GET http://<TeamCity Server host>:<port>/app/rest/buildTypes
|
| List of build configurations of a project |
GET http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/buildTypes
|
Get projects with subprojects' build configurations data and their order as configured by the specified user on the Overview page |
GET http://<TeamCity Server host>:<port>/app/rest/projects?locator=selectedByUser:current&fields=count,project(id,parentProjectId,projects(count,project(id),$locator(selectedByUser:current)),buildTypes(count,buildType(id),$locator(selectedByUser:current)))
|
| List of templates for a particular project |
GET http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/templates
|
| List of all the templates on the server |
GET http://<TeamCity Server host>:<port>/app/rest/buildTypes?locator=templateFlag:true
|
Project Settings
Get project details |
GET http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>
|
Delete a project |
DELETE http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>
|
Create a new empty project |
POST plain text (name) to http://<TeamCity Server host>:<port>/app/rest/projects/
|
Create (or copy) a project |
POST XML <newProjectDescription name='New Project Name' id='newProjectId' copyAllAssociatedSettings='true'><parentProject locator='id:project1'/><sourceProject locator='id:project2'/></newProjectDescription>
to
http://<TeamCity Server host>:<port>/app/rest/projects
Also see an example. |
Edit project parameters |
GET/DELETE/PUT http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/parameters/<parameter_name>
Accepts plain text and XML and JSON. Produces XML, JSON, and plain text depending on the "Accept" header. Also supported requests: |
Project name/description/archived status |
GET/PUT http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/<field_name>
where Accepts/produces text/plain. |
Project's parent project |
GET/PUT XML http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/parentProject
|
Project Features
Project features (for example, issue trackers, versioned settings, custom charts, shared resources and third-party report tabs) are exposed as entries under the "project" node and via dedicated requests.
List of project features |
http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/projectFeatures
To filter features, add |
Create a feature |
|
Edit features |
GET/DELETE/PUT http://<TeamCity Server host>:<port>/app/rest/projects/<projectLocator>/projectFeatures/<featureId>
|