Is it possible to delete a hudson job programmatically via REST API?

爷,独闯天下 提交于 2019-12-12 10:34:45

问题


I can create jobs using /createItem?name=JOBNAME, but cant find anything in the docs about deleting jobs.


回答1:


Discovered by looking into how the delete button does it that you can just post to joburl/doDelete a bit like this..

wget -qO- --post-data="anything" http://HOST/job/JOBNAME/doDelete > /dev/null



回答2:


Go to <JobURL>/api/? You will get below text.

Delete a job

To programmatically delete this job, do HTTP POST to this URL.

DISCLAIMER: I tested it with Jenkins. But this should also work in Hudson.



来源:https://stackoverflow.com/questions/6099139/is-it-possible-to-delete-a-hudson-job-programmatically-via-rest-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!