Calling Rundeck API job with options with Postman
1 min readApr 27, 2020
It’s very easy. But the docs aren’t clear, so here is an example that works:
URL:
POST >
http://myrundeck.com:4440/api/34/job/jobid..../run?authtoken=XXX
Body: (raw/json)
{
"options": {
"servicetorestart": "httpd"
}
}
In my case the problem was that you have to nest the entire “options” block in {}. Otherwise it doesn’t work, and throws:
<result error='true' apiversion='34'><error code='api.error.job.options-invalid'><message>Job options were not valid: Option 'servicetorestart' is required.</message></error></result>