Rundeck支持通过API触发作业。 API文档可在documentation下获得。通过API触发Rundeck作业
我们正在使用API版本13,它尚不支持application/json。因此我需要使用基于XML的请求。
在我以前的尝试,我总是得到回应:
<result error="true" apiversion="13"> <error code="api.error.job.options-invalid"> <message>Job options were not valid: Option 'container' is required. Option 'version' is required. </message> </error> </result>
由于没有提供,我正在寻找一个例子有效载荷触发这个工作没有例子请求。
正如在响应中看到的,我必须提供参数“容器”和“版本”,因为它们是必需的。
我最近的请求负载是:
<executeJob> <argString>-container containerName -version 1234567</argString> </executeJob>
我也试过这个有效载荷,具有相同的响应每一次的不同变化。