TeamCity 2021.1 Help

Manage Typed Parameters

This article lists REST API requests concerning typed parameters.

List Typed Build Parameters

To get a list of all build parameters of a project, use:

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

For a build configuration:

GET http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters

Both endpoints respond with the Properties entity which contains a list of Property instances. These include:

Get Details of Build Parameter

To get a specific parameter, use:

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

or

GET http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters/<name>

Accepts and returns text/plain, application/XML or application/json. Supply the relevant Content-Type header to the request.

Create Build Parameter

To create a build parameter, send Property to:

POST http://<TeamCity Server host>:<port>/app/rest/projects/<locator>/parameters/<name>

or

POST http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters/

Note that secure parameters, for example type=password, are listed, but the values are not included into the response.

Example payload:

<property name="<parameterName>" value="passwordValue"> <type rawValue="password"/> </property>
{ "name" : "parameterName", "type" : { "rawValue" : "password" }, "value" : "passwordValue" }

Update Build Parameter

To update the whole build parameter, send an updated Property to:

PUT http://<TeamCity Server host>:<port>/app/rest/projects/<locator>/parameters/<name>

or

PUT http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters/<name>

Delete Build Parameter

To retrieve a specific parameter, use:

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

or

GET http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters/<name>
Last modified: 14 October 2021