@ResponseBody
	@RequestMapping(value = "/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public AggregateCountsResource display(@PathVariable("name") String name, //
			@RequestParam(value = "from", required = false) @DateTimeFormat(iso = ISO.DATE_TIME) DateTime from, //
			@RequestParam(value = "to", required = false) @DateTimeFormat(iso = ISO.DATE_TIME) DateTime to, //
			@RequestParam(value = "resolution", defaultValue = "hour") AggregateCountResolution resolution) {

		to = providedOrDefaultToValue(to);
		from = providedOrDefaultFromValue(from, to, resolution);

		AggregateCount aggregate = repository.getCounts(name, new Interval(from, to), resolution);

		return aggregateCountResourceAssembler.toResource(aggregate);
	}
Retrieve counts for a given time interval, using some precision.

@param name the name of the aggregate counter we want to retrieve data from
@param from the start-time for the interval, default depends on the resolution (e.g. go back 1 day for hourly
       buckets)
@param to the end-time for the interval, default "now"
@param resolution the size of buckets to aggregate, <i>e.g.</i> hourly, daily, <i>etc.</i> (default "hour")
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/metrics/AggregateCountersController.java