Hello, I am trying to use the Vontu incident report and update API from python 3 and keep getting authentication failed error:
urllib.error.HTTPError: HTTP Error 500: Internal Server Error
suds.WebFault: Server raised fault: 'Authentication failed'
Here is the code:
from suds.client import Client
import suds
proxies = {"http": proxy_http, "https": proxy_https}
url = "https://{}:{}/ProtectManager/services/v2011/incidents?wsdl".format(host, port)
t = suds.transport.https.HttpAuthenticated(username=user, password=passwd, proxy = proxies )
client = Client(url=url, transport = t)
#couple of other options that I tried
#client = Client(url=url, proxy = proxies, username= user, password= passwd)
#client = Client(url=url, proxy = proxies, headers = {'username': user, 'password': passwd})
print(client) # this outputs the wsdl file successfully
inclistreq = client.factory.create("ns3:IncidentListRequest")
inclistreq.savedReportId = 1
inclistreq.incidentCreationDateLaterThan = 0
print(inclistreq) # this outputs a well-formed inclistreq object
result = client.service.incidentList(inclistreq)
The credentials are fine, I can login from the web console and can see the report. Can anyone please help here. Thanks in advance!
-
BR
Zawoad