Original Message:
Sent: 04-14-2026 11:43
From: Zsolt Belicza
Subject: Java platform SDK creates an invalid request to fetch operational console events
My bad, you are right, actually its working. I was just logging the request but the SDK debug showed that its not sending the attribute in this case. I got no data because my range was not correct. Its working now well.
thanks again,
zsolt
------------------------------
Zsolt Belicza
Engineer
Original Message:
Sent: 04-14-2026 10:50
From: Jerome Saint-Marc
Subject: Java platform SDK creates an invalid request to fetch operational console events
Hello,
When the property's value is set to null, it will not be sent in the request body (the property will be ignored/removed from the Request Body).
I just tried to set LEGACY_EMPTY_LIST to false and eventDefinitionIds is not included in the request body.
If you have the SDK Logging enabled (log level = debug), you should not see the null nor [] in the trace of the requestBody for the eventDefinitionIds property. Do you see eventDefinitionIds with a null value in the requestBody (in the sdk console logs)? The eventDefinitionIds should not appear in the logs for the requestBody.
Note that `ApiClient.LEGACY_EMPTY_LIST = false;` has to be set before you create the EventQueryRequest instance (before `EventQueryRequest query = new EventQueryRequest();`)
If you are not getting an error back this time (not getting the 500 status code) and the SDK does not generate an ApiException, it may mean the request is processed by the server.
Just in case, are you sure the OAuth Client you are using have the necessary permissions to get the results? (as the request sent from the developer portal uses the token of the logged in user). If you have a way to try the HTTP request with the same credentials than your Java code, it'd be great.
Regards,
------------------------------
Jerome Saint-Marc
Senior Development Support Engineer
Original Message:
Sent: 04-14-2026 10:00
From: Zsolt Belicza
Subject: Java platform SDK creates an invalid request to fetch operational console events
hi, I have tried adding this to the code but its not working as null was sent but in this case nothing is returned from the server :) I must NOT send eventDefinitionIds at all. Not empty list, not null, it should completed disappear from the list to work...
ApiClient.LEGACY_EMPTY_LIST = false;
Zsolt
Original Message:
Sent: 04-14-2026 02:37
From: Jerome Saint-Marc
Subject: Java platform SDK creates an invalid request to fetch operational console events
Hello,
There is an API Client's parameter (LEGACY_EMPTY_LIST - default: true) which controls how arrays in a class are initialized.
By default, when a model contains a property of type array, the Java SDK initializes the class property with an empty ArrayList (i.e. eventDefinitionIds in EventQueryRequest).
With ApiClient.LEGACY_EMPTY_LIST = false;, the class' array property will be initialized with null;
See here in the README for more details: https://github.com/MyPureCloud/platform-client-sdk-java?tab=readme-ov-file#controlling-the-default-value-of-array-type-attributes-in-models
Regards,
------------------------------
Jerome Saint-Marc
Senior Development Support Engineer
Original Message:
Sent: 04-13-2026 11:13
From: Zsolt Belicza
Subject: Java platform SDK creates an invalid request to fetch operational console events
trying to set it to null was a good idea but unfortunatelly it doesnt work - no rejection but still nothing is returned from the server side. I will see if we can get it fixed with the case owner.
------------------------------
Zsolt Belicza
Engineer
Original Message:
Sent: 04-13-2026 07:56
From: Cesar Padilla
Subject: Java platform SDK creates an invalid request to fetch operational console events
Hi @Zsolt Belicza,
This is a known edge-case. Although eventDefinitionIds is optional, the API does not handle an empty array ([]) correctly and ends up returning HTTP 500. Same thing happens when calling the API directly from the Developer Portal, so it's not only an SDK issue.
Workaround: make sure eventDefinitionIds is not sent at all. If possible, set it to null so the SDK doesn't serialize it, or bypass the SDK and call the REST endpoint directly with only the interval field.
Agree this should either be omitted by the SDK when empty, or ignored by the server. Raising a Genesys case is the right step.
------------------------------
Cesar Padilla
INDRA COLOMBIA
Original Message:
Sent: 04-12-2026 15:38
From: Zsolt Belicza
Subject: Java platform SDK creates an invalid request to fetch operational console events
hi all, not sure if anyone has used Java platform SDK (using latest 251.0.0 version of the SDK) to fetch operations console events. I create the request like this:
EventQueryRequest query = new EventQueryRequest();
query.setInterval("2026-04-10T16:00:01/2026-04-12T22:59:59");
However, the SDK adds another optional parameter list so this is what is actually sent in the body:
{"interval":"2026-04-10T16:00:01/2026-04-12T22:59:59","eventDefinitionIds":[]}
The eventdefinititionIds are used to filter which I dont want to do (adding all of them also creates a problem as there are way too many). So either the SDK should not add this attribute when the list is empty or the server should accept and ignore it.
However, instead the server just sends HTTP 500. I tried to send this input in the developer portal and i get the same error. Has anyone made this working properly? I have just raised a genesys case too but it looks like an annoying bug to me.
thansk,
#PlatformSDK
------------------------------
Zsolt Belicza
Engineer
------------------------------