Can anyone clarify why I am hitting a 413 Entity Too Large error when trying to configure a Data Action in Terraform for a 90-day conversation analytics query? The specific error returned by the Genesys Cloud API is HTTP 413 Request Entity Too Large. I am using the genesyscloud.dataaction resource to map an external system call, but the JSON payload for the settings block exceeds the size limit when I include the full date range from 2023-10-01 to 2023-12-30 in the dateInterval field. My Terraform code looks like this:
resource "genesyscloud.dataaction" "analytics_query" {
name = "MyAnalyticsQuery"
enabled = true
settings = jsonencode({
endpoint = "/api/v2/analytics/conversations/summary"
method = "POST"
body = jsonencode({
dateInterval = {
start = "2023-10-01T00:00:00.000Z"
end = "2023-12-30T23:59:59.999Z"
}
groupBy = ["queue.id"]
})
})
}
I am coming from an AWS Terraform background where I usually handle large datasets by splitting them into multiple API calls or using S3 for storage, but here the request payload itself is being rejected before it even hits the analytics engine. I tried reducing the pageSize in the query parameters, but that did not help because the error is related to the request body size, not the response size. I am based in Lagos and working on a migration project, so I need to understand if this is a hard limit on the Genesys Cloud side or if I am structuring the JSON incorrectly.
Is there a recommended way to split a 90-day query into smaller chunks within a single Data Action, or should I be using multiple Data Actions with staggered date intervals? I noticed that queries under 30 days work fine, so the issue seems strictly tied to the volume of metadata sent in the request. Any code examples for handling this pagination or splitting logic in Terraform would be greatly appreciated.