Enable trigger using API
Answered
Hi, I am looking the way how to enable trigger. I found example how to disable/enable an artifact dependency.
PUT http://<TeamCity Server host>:<port>/app/rest/buildTypes/<buildTypeLocator>/artifact-dependencies/<id>/disabled
I tried the same for trigger - it is working for disable. But in case of enable - not (in case I added 'enabled' in the end instead of 'disabled')
Is there is a way to enable triggers using API ?
https://www.jetbrains.com/help/teamcity/rest/manage-build-configurations.html
Please sign in to leave a comment.
Hello!
Trigger entity does not have "enabled" property, which is why it did not likely work. However, if you would run the request like this:
then it would set the "disabled" property into false and the trigger would be re-enabled.
Please let me know if this approach works for you.
Thanks, it helps !