
Here are all the API endpoints I am utilizing at this time:
/login
/organizations
/locations
/users
/assets
Essentially we call /login and /organization to get the login auth keys
I call /locations because our program looks at the logged in user (we use Active Directory for this) location and only allows them to see only users at their location
I call /users to retrieve the list of users at the location to limit the drop-down list to those the logged in user is supposed to see
I call /assets to look up assets by ID when they are checking devices out
Once they have requested to checkout the device, there is a PUT call to update the asset checked-out-to field
We also have a script that runs each night which reads all user records and updates the location as well as unique_id from our Active Directory domain. We must do this because the LDAP import does not allow us to map these fields over. This is the one script that will read the most records at one time simply because it has to go through each user in the database. We have to run this nightly because the users on our system change each night.
-Chris
Eugene,
Any way to distinguish between a paid customer vs. someone accessing public API? You may just have to issue API keys and ban those that abuse it.
-Chris
From: Eugene Tolmachev <eug...@micajah.com>
Sent: Monday, September 9, 2019 10:14 AM
To: SherpaDesk API <sherpad...@googlegroups.com>; Chris Lamb <chris...@apps.wylieisd.net>; Jon Vickers <jon.v...@micajah.com>
Thanks for this information. Did you just change the /login to the never block list? I saw errors earlier this morning when testing saying I could only call every 1 second and every 5 seconds.
Also, is the error returned a 409? Normally a Throttle error message is a 429.
I’ve set up some test code with simple API calls with delays in them just to test everything out. Will give it a shot and let you know if everything works as explained.
Also, I asked the question earlier. Are the limits applied by IP Address or user id or session? Just curious as our web based programs utilize a single defined user for all API calls to make it simple. We also sit behind a NAT firewall so all calls will appear as if they come from the same IP address.
--Chris
Hi,
Thanks, I added login recently. Please check.
I changed 409 to 429
I block by IP. but we are discuss this now.
Eugene
От: 'Lamb, Chris' via SherpaDesk API <sherpad...@googlegroups.com>
Отправлено: 9 сентября 2019 г. 21:32
Кому: Eugene Tolmachev <eug...@micajah.com>; SherpaDesk API <sherpad...@googlegroups.com>; Chris Lamb <chri...@apps.wylieisd.net>; Jon Vickers <jon.v...@micajah.com>
Тема: RE: [EXTERNAL]RE: [EXTERNAL]RE: API Call limits causing issues
Thanks for this information. Did you just change the /login to the never block list? I saw errors earlier this morning when testing saying I could only call every 1 second and every 5 seconds.
Also, is the error returned a 409? Normally a Throttle error message is a 429.
I’ve set up some test code with simple API calls with delays in them just to test everything out. Will give it a shot and let you know if everything works as explained.
Also, I asked the question earlier. Are the limits applied by IP Address or user id or session? Just curious as our web based programs utilize a single defined user for all API calls to make it simple. We also sit behind a NAT firewall so all calls will appear as if they come from the same IP address.
--Chris
From: Eugene Tolmachev <eug...@micajah.com>
Sent: Monday, September 9, 2019 12:52 PM
To: Lamb, Chris <Chri...@wylieisd.net>; SherpaDesk API <sherpad...@googlegroups.com>; Chris Lamb <chri...@apps.wylieisd.net>; Jon Vickers <jon.v...@micajah.com>
Subject: [EXTERNAL]RE: [EXTERNAL]RE: API Call limits causing issues
Thanks,
we dont have public api, all requests done by customers, BUT they misuse api and do incorrect heavy requests.
Our current state is:
we never block those requests: /ping, /config, /login, /organizations
if we have low database load we DONT block requests.
if we experience DB misusing we add header X-Highdtu-Mode: 1
You may only perform this request every 1 seconds for single item and 10 seconds for lists next 15 minutes because of High Database Load!
if we experience DB overhead we add header X-Highdtu-Mode: 5
You may only perform this request every 5 seconds for single item and 50 seconds for lists next 30 minutes because of Very High Database Load!
Hope this helps!
Eugene
От: Lamb, Chris <Chri...@wylieisd.net>
Отправлено: 9 сентября 2019 г. 19:13
Кому: Eugene Tolmachev <eug...@micajah.com>; SherpaDesk API <sherpad...@googlegroups.com>; Chris Lamb <chri...@apps.wylieisd.net>; Jon Vickers <jon.v...@micajah.com>
Тема: RE: [EXTERNAL]RE: API Call limits causing issues
Eugene,
Any way to distinguish between a paid customer vs. someone accessing public API? You may just have to issue API keys and ban those that abuse it.
-Chris
From: Eugene Tolmachev <eug...@micajah.com>
Sent: Monday, September 9, 2019 10:14 AM
To: SherpaDesk API <sherpad...@googlegroups.com>; Chris Lamb <chri...@apps.wylieisd.net>; Jon Vickers <jon.v...@micajah.com>
Subject: [EXTERNAL]RE: API Call limits causing issues
thanks for feedback, yea we are looking for solution to stabilize situation with DDOS (hacker attack)
Together we will find a solution faster.
What requests you are doing?
I'll senf today our plan on API DDOS prevention
Eugene
От: 'Chris Lamb' via SherpaDesk API <sherpad...@googlegroups.com>
Отправлено: 9 сентября 2019 г. 17:31
Кому: SherpaDesk API <sherpad...@googlegroups.com>
Тема: Re: API Call limits causing issues
Is there anything returned in the headers to indicate how long we have to wait before the next call when we receive a 409 error? I see an X-Highdtu header but it returns a 5 no matter what message I receive back with the 409 error. In other words, when I receive the error "You may only perform this request every 5 seconds. Because of Very High Database Load!" the X-Highdtu is equal to 5 and when I receive the error "You may only perform this request every 50 seconds. Because of Very High Database Load!" the X-Highdtu is equal to 5. I see no other header keys which would indicate when we are supposed to call the API again. So how are we supposed to program for the API to back off the API calls? There is no way to determine when I can make the next attempt.
Honestly at this moment, I can't get any consistent results in my test code. I have no idea what the limits are because I can implement 5 second and 50 second delays in the my test script and some calls work, others do not. There's no logical way to determine what works and what doesn't. Kind of hard to program against the restrictions when I don't know what they are. Your reply indicated a limit of every 5 seconds and 60 seconds but the errors I am receiving indicate 5 and 50 seconds. So....what is the true limit? At this point, none of my programs written to connect via the API are working. Would have been nice to be informed about the change prior to it being implemented.
-Chris
--
You received this message because you are subscribed to the Google Groups "SherpaDesk API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sherpad...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sherpadesk-api/a6c0afbf-3c90-4876-bbd5-b8e672150284%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "SherpaDesk API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sherpad...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to sherpadesk-ap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sherpadesk-api/27ad0ad4-8271-4ee2-9bb1-dc0b62749df7%40googlegroups.com.
Eugene,
Can you clarify that statement? I am not sure what you mean by “and up”.
Are you saying each API call should be from a different authorized account if you want to have different call limits applied for each instance of the program running?
-Chris
--
You received this message because you are subscribed to a topic in the Google Groups "SherpaDesk API" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/sherpadesk-api/mz_M-XvVmj8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
sherpadesk-ap...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sherpadesk-api/364BF396-285F-4E2D-A14D-AE6BFB1F227C%40micajah.com.