Reputation: 175
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
Upvotes: 6
Views: 3013
Reputation: 175
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
Upvotes: 4