TeamCity 2021.1 Help

Manage Typed Parameters

This article lists REST API requests concerning typed parameters.

List typed parameters

For a project:

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

The information returned is: parameters count, property name, value, and type. The rawValue of the type element is the parameter specification as defined in the UI.

Get details of a specific parameter

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

Accepts/returns plain-text, XML, JSON. Supply the relevant Content-Type header to the request.

Create a new parameter

POST the same XML or JSON or just plain-text as returned by GET to http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters/. Note that secure parameters, for example type=password, are listed, but the values not included into response, so the result should be amended before POSTing back.

Example of XML for setting a property:

<property name="<parameterName>" value=""> <type rawValue="password"/> </property>

Since TeamCity 9.1, partial updates of a parameter are possible (currently in an experimental state):

  • Name: PUT the same XML or JSON as returned by GET to http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters/NAME

  • Type: GET/PUT accepting XML and JSON as returned by GET to the URL http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters/NAME/type

  • Type's rawValue: GET/PUT accepting plain text http://<TeamCity Server host>:<port>/app/rest/buildTypes/<locator>/parameters/NAME/type/rawValue

Last modified: 25 January 2021