code: public AggregatesResponse getMessageAggregates(String sdid, String field, Long startDate, Long endDate) throws ApiException {
          ApiResponse<AggregatesResponse> resp = getMessageAggregatesWithHttpInfo(sdid, field, startDate, endDate);
          return resp.getData();
      }
docs: Get Normalized Message Aggregates
  Get Aggregates on normalized messages.
  @param sdid Source device ID of the messages being searched. (required)
  @param field Message field being queried for aggregates. (required)
  @param startDate Timestamp of earliest message (in milliseconds since epoch). (required)
  @param endDate Timestamp of latest message (in milliseconds since epoch). (required)
  @return AggregatesResponse
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body