code: @SuppressWarnings("nls")
      public List<BucketDataPointBean> getCounterData(String tenantId, String counterId, Date from, Date to,
              BucketSizeType bucketSize) {
          try {
              StringBuilder params = new StringBuilder();
              params.append("?")
                  .append("start=")
                  .append(from.getTime())
                  .append("&end=")
                  .append(to.getTime())
                  .append("&bucketDuration=")
                  .append(bucketSize.getValue());
              URL endpoint = serverUrl.toURI().resolve("counters/" + counterId + "/stats" + params.toString()).toURL(); //$NON-NLS-1$
              Request request = new Request.Builder()
                      .url(endpoint)
                      .header("Accept", "application/json") //$NON-NLS-1$ //$NON-NLS-2$
                      .header("Hawkular-Tenant", tenantId) //$NON-NLS-1$
                      .build();
              Response response = httpClient.newCall(request).execute();
              if (response.code() >= 400) {
                  throw hawkularMetricsError(response);
              }
              if (response.code() == 204) {
                  return Collections.EMPTY_LIST;
              }
              String responseBody = response.body().string();
              return readMapper.reader(new TypeReference<List<BucketDataPointBean>>() {}).readValue(responseBody);
          } catch (URISyntaxException | IOException e) {
              throw new RuntimeException(e);
          }
      }
docs: Gets a list of buckets containing aggregate information about data in the
  indicated counter.  The number of buckets is determined by the bucket size
  and date/time range specified.
  @param tenantId
  @param counterId
  @param from
  @param to
  @param bucketSize