Reputation: 326
I'm planning on running a one liner curl command like this:
https://rundeck.url.com/api/1/job/${job_id_here}/run?authtoken=${token_here}&Message=hello
wherein the Message
is an option or if a variable inside a Rundeck job.
Upvotes: 1
Views: 5309
Reputation: 21
curl -D - \
-X "POST" -H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Rundeck-Auth-Token: j97rbzw19u9pT1a0JvQTcmFuzaFYW71W" \
-d "{\"argString\":\" -servername $servername -foldername $foldername \"}" \
http://192.168.43.50:4440/api/16/job/c0649a32-1264-47fd-a345-e061794b2326/executions
Upvotes: 2
Reputation: 4325
You can use:
curl --data-urlencode "argString=-optionname value" http://yourhost:4440/api/29/job/${your-job-id}/run?authtoken=${your-auth-token}
Upvotes: 1