Question

REST API Login Help - Python

  • 17 January 2023
  • 6 replies
  • 415 views

Badge

I am trying to submit a ticket using Sysaid REST API. I am stuck at making a login connection.

 

I am using Phyton, here’s the code:

 

import requests

 

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

 

info={ "user_name": "username",

"account_id": "accountid",

"password" : "password"

}

#url = "https://systemone.sysaidit.com/api/v1/Login"

 

l = requests.post(url=url, json=info, headers=headers)

 

We use SSO/Oauth. I think thats causing problem as I found on Sysaid site that REST Api wont work for OAuth users. Is there a work around?

  • Also, a maximum of two API login requests will be allowed within a five minute period

I have to wait 5 minutes everytime to test , my code. For API development this should not be the limitation. Can you take this off for out company?


6 replies

Userlevel 5
Badge

Hi @abhatia

Check out this post for how to set up the login process for API:

Regarding the limitation on a number of logins during the 5 minutes unfortunately it is not flexible and was put in place with security standards in mind. 

Let us know how it goes and what you are building!

 

Badge

Thanks Maaayan. I created decicated user for API which is excluded from SSO but the url below does not work to login, it just returns the entire page HTML:

[account name].sysaidit.com/Login.jsp?manual=true

 

Badge

I tried it again url below just returns login page HTML:

http://[company].sysaidit.com/Login.jsp?manual=true

Let me know URL for logging to Sysaid via API. I am using a non SSO enabled account

Userlevel 5
Badge

Hi @abhatia, did you figure it out in the end? If not please reach out to our Customer Care team via live chat or open a ticket on our Customer Porta and foind out what is the issue. 

Cheers,

Badge

Yes I figured it out. Thanks.

Userlevel 5
Badge

@abhatia amazing, would you like to share what was the solution so more can learn from it? :) 

Reply