Abhijeet | 2020-04-15 11:17:25 UTC | #1
Hi Team,
I am trying to read the data from the purecloud app with 30 minutes interval and iterating through the dates. On doing some iterations the end points stops responding.
Is there any issue with the API?
I am using python requests library to make the iterative calls to API endpoint.
Thanks,
Abhijeet Hivarkar
tim.smith | 2020-04-15 13:08:17 UTC | #2
Abhijeet, post:1, topic:7551
On doing some iterations the end points stops responding.
What do you mean by "stops responding"? Is your client timing out? Are you getting an explicit timeout response from the API? Is your network dropping your connection and you're not getting a response at all?
Abhijeet | 2020-04-15 13:17:17 UTC | #3
I am not getting response at all there is no explicit error message received as response. The code just hangs up in between. So i did reduced the interval to 1 day load till today's date and then once the load reaches current date then i am loading in the iteration of 30 minutes. In the new logic i was able to read all the data.
How can i check client is timing out or not?
tim.smith | 2020-04-15 13:19:51 UTC | #4
The API will explicitly timeout with a 504 response after no longer than 15 seconds. If your app is hanging and not processing a response for longer than that, there's likely something wrong with your app.
Abhijeet | 2020-04-21 11:52:38 UTC | #5
Hi Tim,
Is there any timeout or limit decided for the PlatformAPI response?
When I pause the code from requesting by 20 sec before next request then only I get response without any issue. If I don't pause my reads then the code hands up.
If there is some issue with my app then how can I investigate on the same.
Also how can i check ,whether the connection is no more there as I am not getting any timeout response from the API.
Thanks,
Abhijeet Hivarkar
anon28885283 | 2020-04-24 05:31:46 UTC | #6
Is there any timeout or limit decided for the PlatformAPI response?
I̶t̶'̶s̶ ̶3̶0̶ ̶s̶e̶c̶o̶n̶d̶s̶ ̶a̶s̶ ̶d̶o̶c̶u̶m̶e̶n̶t̶e̶d̶ ̶h̶e̶r̶e̶:̶ ̶ EDIT: It's 15 seconds. The documention will be updated. https://developer.mypurecloud.com/api/rest/index.html#request_default_timeout
Is there any issue with the API?
There shouldn't be any reason for the API to cause your code to hang up as it's just an endpoint that provides data. You mentioned you're using the requests library, but we also have an SDK to help with consuming API operations - you can try to see if it helps.
https://developer.mypurecloud.com/api/rest/client-libraries/python/index.html
tim.smith | 2020-04-22 12:37:56 UTC | #7
anon28885283, post:6, topic:7551
Is there any timeout or limit decided for the PlatformAPI response?
It's 30 seconds as documented here: https://developer.mypurecloud.com/api/rest/index.html#request_default_timeout
It's actually 15 seconds, will get that doc updated.
Abhijeet | 2020-04-23 06:04:33 UTC | #8
Hi Tim,
The time out for end point request is 15 second is that mean the transaction quota is only for 15 sec? I mean to say if I query the end point for some time period and the rest api took more than 15 seconds to build my response and send across then will my code hand up waiting for response from the end point?
In a nutshell what is the transaction quota for the endpoints to build the response and send it.
Thanks,
Abhijeet Hivarkar
tim.smith | 2020-04-24 14:07:34 UTC | #9
After further discussion internally, we're removing that section from the docs entirely. The default timeout for a resource is 15 seconds, but some resources may time out faster or slower than that. Apps shouldn't concern themselves with the specific time a request will take; a 504 response will be returned when a timeout occurs. If your app is hanging, that's a problem with something in your app, not the Genesys Cloud API.
system | 2020-05-25 14:21:59 UTC | #10
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 7551