code: public AggregatesHistogramResponse getAggregatesHistogram(Long startDate, Long endDate, String sdid, String field, String interval) throws ApiException {
          ApiResponse<AggregatesHistogramResponse> resp = getAggregatesHistogramWithHttpInfo(startDate, endDate, sdid, field, interval);
          return resp.getData();
      }
docs: Get Normalized Message Histogram
  Get Histogram on normalized messages.
  @param startDate Timestamp of earliest message (in milliseconds since epoch). (required)
  @param endDate Timestamp of latest message (in milliseconds since epoch). (required)
  @param sdid Source device ID of the messages being searched. (optional)
  @param field Message field being queried for building histogram. (optional)
  @param interval Interval of time for building histogram blocks. (Valid values: minute, hour, day, month, year) (optional)
  @return AggregatesHistogramResponse
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body