Visual Process API error
Hello,
I'm trying to use Monarch Visual Process Designer API from Python. Login request returns success, but visualprocess/start returns an error. Below is a script and the output. What am I doing wrong?
Thank you!
monarch_rest_api.py
import requests
url = "http://us1-monarch1/MSAdmin/api"
login_info = {"Username":"test_login", "Password":"test_password"}
jobname = "Test Job"
resp = requests.post(url + "/login", json = login_info)
print ("Login: ", resp.status_code)
resp = requests.post(url + "/v1/visualprocesses/start", data=jobname, headers={'Content-Type':'application/json'})
print ("Start: ", resp.status_code)
print (resp.json())
Output
H:\python>python monarch_rest_api.py
Login: 200
Start: 500
{'Message': 'An error has occurred.'}
------------------------------
Leonid Shteyngardt
App Dev Manager
Canaccord Genuity Inc.
New York NY
(212) 389-8176
------------------------------
I'm trying to use Monarch Visual Process Designer API from Python. Login request returns success, but visualprocess/start returns an error. Below is a script and the output. What am I doing wrong?
Thank you!
monarch_rest_api.py
import requests
url = "http://us1-monarch1/MSAdmin/api"
login_info = {"Username":"test_login", "Password":"test_password"}
jobname = "Test Job"
resp = requests.post(url + "/login", json = login_info)
print ("Login: ", resp.status_code)
resp = requests.post(url + "/v1/visualprocesses/start", data=jobname, headers={'Content-Type':'application/json'})
print ("Start: ", resp.status_code)
print (resp.json())
Output
H:\python>python monarch_rest_api.py
Login: 200
Start: 500
{'Message': 'An error has occurred.'}
------------------------------
Leonid Shteyngardt
App Dev Manager
Canaccord Genuity Inc.
New York NY
(212) 389-8176
------------------------------