RunDeck run API usage with parameters

1,518 views
Skip to first unread message

Saju Joseph

unread,
Dec 18, 2014, 1:36:22 AM12/18/14
to rundeck...@googlegroups.com
I want to run a rundeck job using the run API. Would like to pass few parameters as well to the runDeck job during the run time.

Do I need to configure the job to accept parameters?
How to pass parameters to run API?

Thanks in advance

Regards
SJ

danifr

unread,
Dec 18, 2014, 9:30:32 AM12/18/14
to rundeck...@googlegroups.com
Hi,

example using CURL: https://github.com/rundeck/rundeck/blob/development/test/api/test-job-executions.sh#L514
example using Python Requests:

    url = 'https://rundeckserver:4443/api/1/jobs'
    payload = { 'project':  project_name }
    headers = {'Content-Type': 'application/json','X-RunDeck-Auth-Token': API_KEY }
    r = requests.get(url, params=payload, headers=headers, verify=False)
 
That's pretty much it.
Cheers
Dani.

Saju Joseph

unread,
Dec 19, 2014, 1:21:47 AM12/19/14
to rundeck...@googlegroups.com
Do you have any examples using Java? Or is it possible to run the job using "rundeck-api-java-client". Would be great to if you update how to pass the parameters in any of these cases
Reply all
Reply to author
Forward
0 new messages