import requests
api_token = 'XXXXXXXXXXXXXXX'
base_url = "https://www.example.com:8888"
job_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXX"
url = base_url + "/api/12/job/" + job_id + "/executions"
headers = {'X-Rundeck-Auth-Token': api_token}
# messageという名前のオプションにHELLOを指定する場合
payload = {"argString": "-message HELLO"}
response = requests.post(url, headers=headers, data=payload)
print(response.status_code)
print(response.text)
More than 5 years have passed since last update.
RUNDECKのジョブをAPI経由でオプション指定して実行(Python)
Last updated at Posted at 2017-12-26
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme