Legacy Dev Forum Posts

 View Only

Sign Up

PostAnalyticsUsersDetailsJobs Rate Limit Error

  • 1.  PostAnalyticsUsersDetailsJobs Rate Limit Error

    Posted 06-05-2025 18:23

    Jamie | 2022-08-16 02:15:03 UTC | #1

    Hello,

    We have run into issues when restoring agent data. Here's the details:

    • We have been using the same request throttling strategy for more than 3 years to ensure we're not sending requests more frequently than 300 / min
    • Starting from 2022-07-22 we started to get the following error:

    o PureCloudPlatform.Client.V2.Client.ApiException: Error calling PostAnalyticsUsersDetailsJobs: {"message":"Rate limit exceeded the maximum. Retry the request in [1] seconds","code":"too.many.requests.retry.after","status":429,"contextId":"3b4f9e29-1f1b-4661-8c94-7abb417514f3","details":[],"errors":[]}

    • Based on our monitoring, we're dispatching about 30-50 requests per minute
    • The issue seems to be pertinent to PostAnalyticsUsersDetailsJobs while all other requests are still working just fine.
    • Once we hit a 429, it takes 1-5 re-requests (with 30 sec delay in between) to get the data

    Here’s a sample query in c#: var api = new AnalyticsApi(); var predicates = new List<UserDetailQueryPredicate>(agent_ids.Select(a => new UserDetailQueryPredicate(UserDetailQueryPredicate.TypeEnum.Dimension, UserDetailQueryPredicate.DimensionEnum.Userid, UserDetailQueryPredicate.OperatorEnum.Matches, a) ));

    var body = new AsyncUserDetailsQuery { Interval = string.Format("{0:yyyy-MM-ddTHH:mm:ss}/{1:yyyy-MM-ddTHH:mm:ss}", starttime, endtime), UserFilters = new List<UserDetailQueryFilter>() { new UserDetailQueryFilter(UserDetailQueryFilter.TypeEnum.Or, null, predicates) } }; AsyncQueryResponse resp = null; dispatcher.InvokeAndWait(() => resp = api.PostAnalyticsUsersDetailsJobs(body));

    If we send this query to get user details by small batches (i.e. 1-5 agent ids per request) - after 3-5 minutes of such polling we get PureCloudPlatform.Client.V2.Client.ApiException: Error calling PostAnalyticsUsersDetailsJobs: {"message":"Rate limit exceeded the maximum. Retry the request in [1] seconds","code":"too.many.requests.retry.after","status":429,"contextId":"3b4f9e29-1f1b-4661-8c94-7abb417514f3","details":[],"errors":[]}

    Here every api call is wrapped in a well-tested "dispatcher.InvokeAndWait();" which limits request rate by 300 rpm and works just fine for all other requests except this one. Our monitoring shows a request rate of 30-50 rpm when we start receiving a "429".

    Is there any specific limit for jobs api (PostAnalyticsUsersDetailsJobs)?

    We haven’t been able to find any details here https://developer.genesys.cloud/organization/organization/limits

    And mentioned before, all other api requests continue to work just fine except for PostAnalyticsUsersDetailsJobs.

    Any assistance is appreciated. Thank you


    tim.smith | 2022-08-16 13:21:53 UTC | #2

    Please be sure to review the Genesys Cloud documentation for rate limits and best practices for handling them. There are more limiters than the initial 300 per minute per token limit. https://developer.genesys.cloud/platform/api/rate-limits

    POST /api/v2/analytics/conversations/details/jobs has additional documented limits in the Resource Limits section. There may be other undocumented limits for this resource as well. If you believe that you are being rate limited errorenously, please open a case with Genesys Cloud Care to investigate.


    alex.betz | 2022-08-19 13:32:15 UTC | #3

    Jaime, I see this pertains to an open Care ticket. Let's close out this post and I will follow up directly with you to bring this to a resolution.

    Regards Alex


    system | 2022-09-19 13:32:41 UTC | #4

    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: 15892