我正在使用下面的 curl 命令将 test.xml 作业导入 rundeck,但它不起作用。
curl -v "X-Rundeck-Auth-Token:XXXXX" -F xmlBatch=@"/home/ec2-user/test.xml" --insecure https://hostaname:4443/api/14/project/DistributedArchitecture/jobs/import
我在 Linux 机器上收到以下错误:
Error: HTTP/1.1 100 Continue
< HTTP/1.1 400 Bad Request
< Set-Cookie: JSESSIONID=co8wd4jqamut1i8ejwdqu6g7z;Path=/
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Content-Type: text/xml;charset=UTF-8
< X-Rundeck-API-Version: 17
< Transfer-Encoding: chunked
< Server: Jetty(7.6.0.v20120127)
HTTP error before end of send, stop sending
<result error='true' apiversion='17'>
<error code='api.error.jobs.import.invalid'>
<message>Jobs Document was invalid for format xml: rundeck. controllers. JobXMLException: Document root tag was not 'joblist': 'Error'</message>
</error>
Closing connection 0