I used this curl command to import a test.xml job to rundeck but it's not working.
curl -v "X-Rundeck-Auth-Token:XXXXX" -F xmlBatch=@"/home/ec2-user/test.xml" --insecure https://hostaname:4443/api/14/project/DistributedArchitecture/jobs/import
This error comes up on the Linux box:
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