Import

I want to import job.xml into Rundeck via curl.
Try something like this:

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

I get an answer 302 and that is all

Can someone help me with a working sample or help create / modify such

+6
source share
1 answer

So I managed to download the work, and it works. I stopped using simple authentication and decided to use an authentication token, which you can generate in the user profile settings. This did the trick 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 
+4
source

Source: https://habr.com/ru/post/972173/


All Articles