Logging into SysAid using Web-services

  • 21 November 2014
  • 4 replies
  • 227 views

I'm trying to log into SysAid using the web-services framework.

To do this, I'm sending the following SOAP request

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:login xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://api.ilient.com/">
<accountId>JHUPHA</accountId>
<userName>llee65</userName>
<password>XXXXPLAIN TEXT PASSWORDXXXX</password>
</ns1:login>
</soapenv:Body>
</soapenv:Envelope>


To https://sysaid.jhu.edu:8443/services/SysaidApiService and am receiving the following response:


<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:loginResponse xmlns:ns2="http://api.ilient.com/">
<return>0</return>
</ns2:loginResponse>
</S:Body>
</S:Envelope>


It appears that my SOAP request is valid because SysAid is returning a valid response, but the Session ID is always 0. I'm using an Admin account on a University license, but am not sure if some other configuration is required.

Any help would be greatly appreciated. Our ability to connect to SysAid using web-services was a critical part of our decision to purchase SysAid in the first place.

Thanks,
Larry

4 replies

Did you ever get this resolved? I am having the same issue.
Userlevel 5
Badge
Hi josecgomez,

We Higley recommend you move to REST API it is easier to use and is best practice today.
you can read more about it here:

SysAid REST API Guide

Cheers,
Maayan

josecgomez
Did you ever get this resolved? I am having the same issue.
Badge

Please share Rest API code example for logging to sysaid. I tried python code below but it gives error:

 

import requests

headers  = {"Content-Type: application/json"}

params = {

 "user_name": "username",

"account_id": "accountid",

"password" : "password"

}

url = "https://company.sysaidit.com/api/v1/login"

l = requests.post(url,headers=headers,params=params)

print(l.text)

 

This is error:

AttributeError: 'set' object has no attribute 'items'

 

Any help is appreciated

Hi @abhatia!

You need to create a administrator account in SysAid (or use local admin account) that has permissions and in the body you need to specify the username and the password.

 

 

Let me know if it helps!

Reply