Austen | 2020-11-24 22:18:15 UTC | #1
Hi,
I'm investigating an issue where we appear to have not received a full set of UserStation data for a particular User object while retrieving it under simulated load, testing how we deal with rate limit errors.
We retrieve station data by listing it in the expand parameters of the calls to /api/v2/users, along with a number of other expand options.
When we call a function with an expand parameter such as this to retrieve, say, a page of data, does that count as a single call towards the total rate limit? Or do the extra data retrieval operations happening behind the scenes to retrieve the additional expand data items also count towards the rate limit? Is it possible for a single API call that includes an expand parameter to hit the rate limit while assembling the compound data and only return part of it?
Thanks,
Austen
anon11147534 | 2020-11-26 14:30:44 UTC | #2
Hi,
No, rate limits are per call of the API so any background retrieval operations don't count towards the rate limit. If you feel there is data missing from the API response you could create a ticket with Care to investigate the issue. https://help.mypurecloud.com/articles/contact-genesys-cloud-care/
anon11147534 | 2020-11-30 17:26:18 UTC | #3
@Austen A clarification on the rate limits. When a call comes into Public API, there is a limit of how many fan-out notifications one request can generate before it will get rate limited. Expand parameters are a likely cause of such rate limits. Requesting a smaller page size and paging through the responses would be best way to avoid internal rate limiting in this case.
Austen | 2020-12-02 13:28:18 UTC | #4
@anon11147534 Thanks for the clarification. I didn't manage to catch the log with the problem request in before it rolled over, so what should we expect to receive if we make a request with numerous expand parameters that hits the rate limit part way through? Will we get a partial object returned, a 429 error or something else?
anon11147534 | 2020-12-03 14:26:13 UTC | #5
I'm not sure what would be returned from the API in such a case. It certainly would be helpful if a 429 code or some other code to indicate an internal rate limit were returned. The partial response you got is likely the behaviour for this particular API but it could be different for other APIs. If you encounter the same issue again and have the log of the request including the correlationId the care team could follow up on it to fully determine the issue.
Austen | 2020-12-08 20:38:50 UTC | #6
Thanks Ronan, I will monitor that server for further instances of this and see if I can capture it in the log to raise a care ticket.
On a possibly related note, I have seen a similar issue today with a call that doesn't use the expand parameter. When retrieving all Schedule Groups, it retrieves part of the batch fully, but appears to miss the DomainEntityRefs for open/closed/holiday schedules for some items. Again, this was brought to my attention long after the log had rolled over, but it appears the data was originally retrieved in full, then we received a partial set once before the original full set was reinstated.
Despite not using an expand parameter, this issue has the same matching characteristics as the issue with the Users call. Does the API function to retrieve all Schedule Groups make multiple calls behind the scenes that could trigger the rate limit in a similar way to the Users call?
tim.smith | 2020-12-08 21:24:33 UTC | #7
Austen, post:6, topic:9376
Does the API function to retrieve all Schedule Groups make multiple calls behind the scenes that could trigger the rate limit in a similar way to the Users call?
That question isn't as straightforward as it seems. When fulfilling requests to the Platform API, there are internal rate limiters that could apply from different sources and in different contexts. So even if only one internal request to a backend service is required, it could be rate limited when your request to the Platform API was not. Regardless, missing data always needs to be reported to Care for further investigation; this public forum is not an appropriate avenue to dig into a customer's data. Care will need a correlation ID from the response that was missing data, as well as a successful one.
system | 2021-01-08 21:24:35 UTC | #8
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: 9376