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

6 comments
Comment actions Permalink

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>

0
Comment actions Permalink

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.

0
Comment actions Permalink

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
0
Comment actions Permalink

Here is an example with CURL command-line tool

curl -v --basic --user USERNAME:PASSWORD --request PUT "http://teamcity/httpAuth/app/rest/buildTypes/BUILDTYPE/triggers/vcsTrigger/disabled" --header "Content-Type: text/plain" --data "true"

0
Comment actions Permalink

Perfect, thanks!

0

Please sign in to leave a comment.