Calling Rundeck API job with options with Postman

Kobi Rosenstein
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>

--

--

Kobi Rosenstein
Kobi Rosenstein

Written by Kobi Rosenstein

Devops engineeer. This blog chronicles my “gotcha” moments — Each post contains an answer I would have like to have found when trawling google.

No responses yet