2
votes

I need to update the specification of a configuration parameter using Teamcity REST API.

enter image description here

Following the REST documentation I tried a PUT request with the parameter value like:

http://teamcity:80/httpAuth/app/rest/projects/TestProject/parameters/TestProjectParam

But this updates the value of the parameter, however I need to udpate the specification of the parameter. I am using Teamcity 8.0.6

1

1 Answers

3
votes

I have no way of validating if this works with TeamCity 8.0.6, but the following will create/update a parameter with spec in TeamCity 8.1.3.

Request

POST http://teamcity:80/httpAuth/app/rest/projects/TestProject/parameters/

Headers

Content-Type: application/xml
Authorization: YourToken

Body

<property name="TestProjectParam" value="" own="true">
  <type rawValue="select data_2='400' data_1='300' display='normal' data_3='500'" />
</property>