2

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

Mohammad Nadeem
  • 9,134
  • 14
  • 56
  • 82

1 Answers1

4

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>
SteveChapman
  • 3,051
  • 1
  • 22
  • 37
  • That's right I have realized the REST documentation says 8.1 only. I think in 8.0.6, only the value of parameter can be set, as I don't see rest of the properties even in a get request. – Mohammad Nadeem Jul 01 '14 at 05:32