Disable build steps via REST api

Is it possible to disable and re-enable build steps through TeamCity's REST api?  I can easily GET information about a build step from /httpAuth/app/rest/buildTypes/%buildTypeId%/steps/RUNNER_###.  And the documentation says that DELETE is supported.  But I don't really want to delete the step; just disable it.  Has anyone done this before?  If not through REST, is there some other programmatic way of accomplishing this?


Comment actions Permalink

Hi Kyle,

There are not all methods described in documentation. To disable excisting build step, please use:

curl --basic --user user:pass --request PUT  http://localhost:8111/httpAuth/app/rest/buildTypes/<locator>/steps/<step_id>/disabled --data "true" --header "Content-Type: text/plain"

Please read How to explore REST API.


Please sign in to leave a comment.