POST /api/v2/analytics/users/queues returns 429 despite rate limit headers indicating availability

Dealing with a very strange bug here with the analytics API during our automated reporting pipeline. We are pulling queue performance metrics for the last 24 hours using the genesyscloud Terraform provider to manage the schedule, but the actual data fetch happens via a custom Go script using the Genesys Cloud SDK v11.4.2.

The script hits /api/v2/analytics/users/queues with a granularity of hourly. The request payload looks standard:

request:
 method: POST
 url: /api/v2/analytics/users/queues
 headers:
 Content-Type: application/json
 Authorization: Bearer <token>
 body:
 dateFrom: "2023-10-25T00:00:00.000Z"
 dateTo: "2023-10-26T00:00:00.000Z"
 size: 1000
 select:
 - "queueId"
 - "acwSeconds"
 - "talkSeconds"

The response is a hard 429 Too Many Requests. However, the Retry-After header is missing, and the X-RateLimit-Remaining header in the previous successful call showed 45 requests left. The X-Request-Id is unique. This only happens when the size parameter exceeds 500. Reducing to 200 works but requires pagination logic that the SDK should handle. Is this a known issue with the analytics endpoint batching or is the SDK ignoring the cursor correctly? Environment is Sydney production.

The easiest fix here is this is…

{
 "interval": "PT1H",
 "date_from": "2023-10-27T00:00:00.000Z",
 "date_to": "2023-10-27T23:59:59.999Z"
}

Reduce the query window from 24 hours to smaller intervals, such as 4 or 8 hours. The analytics engine struggles with large hourly aggregations across multiple agents, which triggers the rate limiter even when headers suggest capacity.