Hello,
I'm using genesys Cloud SDK Java "Ver.0.110".
Get the data using the postAnalyticsQueuseObservationsQuery method and store it in the apiResponse variable "apiResponse".
After that I use the getBody method to get body (Json).
I can use the getBody method to get body (Json) normally, but it may return NULL.
If null is returned using the getBody method, does the body (Json) mean empty?
The following is java code:
AnalyticsApi apiInstance = new AnalyticsApi( "Objects of the ApiClient class (created separately)" );
PostAnalyticsQueuesObservationsQueryRequest.Builder reqBuilder = PostAnalyticsQueuesObservationsQueryRequest.builder();
reqBuilder.withBody( query );
PostAnalyticsQueuesObservationsQueryRequest apiRequest = reqBuilder.build();
I would suggest using the latest possible version of the SDK. The latest version is 137.0.0.
You can use the analytics query builder to generate these requests. I would suggest making the same request using that tool to compare the response, you can then see for sure if the request generated an empty response.
Thanks for your answer.
Let me ask you additional questions.
I can usually get the data by using the getBody method below.
But I got NULL using the getBody method.
What caused me to get NULL?
I'm not too sure. Possibly a request that's returning no data. Using the debugger to see the raw response body or making the same request using the analytics query builder or API explorer would go further to explain what response you are getting.