Rundeck Curl Job Import
Asked Answered
O

1

6

I want to import a job.xml to Rundeck via curl.
Trying something like this:

curl -v -u admin:admin -F xmlBatch=@C:\job.xml http://XXXXXXXXXX/api/1/jobs/import

I get the 302 response and that's all

Can somebody help me out with a working sample or help to create/modify such one

Outleap answered 14/7, 2014 at 13:22 Comment(0)
O
4

So I managed to upload a job and it's working. I stopped using simple authentication and went for using authentication token, that you can generate in the user profile settings. That made the trick
The working command for cURL:

curl -v --header "X-Rundeck-Auth-Token:<token-value>" -F xmlBatch=@"X:\job.xml"  http://xxx.xxx.xxx.xxx/api/1/jobs/import
Outleap answered 15/7, 2014 at 15:59 Comment(1)
what about if i have yaml formatted job file?Rovit

© 2022 - 2024 — McMap. All rights reserved.