Is there a REST API for changing "project level" configuration parameters?
Hello,
To put it into context, I am part of a team using configuration parameters defined at project level. Each project has a number of build configurations that use these configuration parameters.The build configurations are setup to trigger one after the other using the dependencies feature of TeamCity. As such if you run the top level build configuration and it completes successfully, the second one runs and so on.
Getting back to my question, I would like to automatically change the values for the configuration parameters that are defined at project level. Afterward I would trigger the top level build which should pick up the updated configuration parameter. I wonder if there is a REST api to allow changing configuration parameters at the project level. The REST API documentation only shows API allowing configuration parameter changes at build configuration level.
Best Regards,
Horace
Please sign in to leave a comment.
Filed as TW-20131
I have a scheduled release build and want to have it automatically disable the VCS trigger for a continuous integration build. I see the REST API provides visibility to the trigger but I can't figure out how to disable it through the API. Is anyone aware of how to use this? I can't find any examples of the parameter format.
http://teamcity:8111/httpAuth/app/rest/buildTypes/<buildTypeLocator>/triggers/<id>
John,
Seems unrelated to the original discussion...
Still, try PUT "true" or "false" as text/plain to http://teamcity:8111/httpAuth/app/rest/buildTypes/<buildTypeLocator>/triggers/<id>/disabled
If you have more questinos, please start a new thred.
Thanks for the reply. I get back "false" if I run the following:
<URL>/app/rest/buildTypes/bt3/triggers/vcsTrigger/disabled
I've tried different ways to PUT true or false but only get an error. Do you know the syntax on how to pass the value? I looked at the wadl but it's not clear to me.
<ns2:resource path="/{btLocator}/triggers/{triggerLocator}/{fieldName}">
<ns2:param xmlns:xs="http://www.w3.org/2001/XMLSchema" name="btLocator" type="xs:string"/>
<ns2:param xmlns:xs="http://www.w3.org/2001/XMLSchema" name="triggerLocator" type="xs:string"/>
<ns2:param xmlns:xs="http://www.w3.org/2001/XMLSchema" name="fieldName" type="xs:string"/>
<ns2:method id="getTriggerSetting" name="GET">
<ns2:response>
<ns2:representation mediaType="text/plain"/>
</ns2:response>
</ns2:method>
<ns2:method id="changeTriggerSetting" name="PUT">
<ns2:request>
<ns2:representation mediaType="text/plain"/>
</ns2:request>
</ns2:method>
Thanks
Here is an example with CURL command-line tool
Perfect, thanks!