TeamCity REST API Reference 2024.07 Help

Edit Project Settings

This article contains use cases related to editing projects via TeamCity REST API:

  • Edit project-level build parameters and project name and description.

  • Update project features.

  • Archive and unarchive a project.

Manage Project-Level Build Parameters

To get a value of an existing project-level build parameter, use:

/app/rest/projects/<projectLocator>/parameters/<parameterName>

By default, the call will return text/plain with the value of the parameter.

To create a parameter, use:

/app/rest/projects/<projectLocator>/parameters

The type of the request's body is Property:

<property name="myCustomParameter" value="myCustomValue"/>
{ "name" : "myCustomParameter", "value" : "myCustomValue" }

To update a parameter, send the same body with the following PUT request:

/app/rest/projects/<projectLocator>/parameters/<parameter>

To delete a project-level parameter, use:

/app/rest/projects/<projectLocator>/parameters/<parameter>

Update Project Name and Description

To get a project's name or description, use:

/app/rest/projects/<projectLocator>/parameters/<fieldName>

where fieldName is either name or description. To update either field, use:

/app/rest/projects/<projectLocator>/parameters/<fieldName>

The payload should be in the text/plain format.

Create Project Feature

Project features include issue trackers, versioned settings, custom charts, shared resources, and third-party report tabs.

To create a new project feature, use:

/app/rest/projects/<projectLocator>/projectFeatures

For example, to add a new report tab, post the following ProjectFeature:

<projectFeature type="ReportTab"> <properties> <property name="startPage" value="coverage.zip!index.html"/> <property name="title" value="Code Coverage"/> <property name="type" value="BuildReportTab"/> </properties> </projectFeature>
{ "type" : "ReportTab", "properties" : { "property" : [ { "name" : "startPage", "value" : "coverage.zip!index.html" }, { "name" : "title", "value" : "Code Coverage" }, { "name" : "type", "value" : "BuildReportTab" }, ], } }

Edit Project Feature

To get a specific project feature, use:

/app/rest/projects/<projectLocator>/projectFeatures/<featureId>

To update it, PUT ProjectFeature to the below endpoint:

/app/rest/projects/<projectLocator>/projectFeatures/<featureId>

To delete a project feature, use:

/app/rest/projects/<projectLocator>/projectFeatures/<featureId>
Last modified: 29 March 2022