code: @RequestMapping(value = "", method = RequestMethod.GET)
  	public PagedResources<AggregateCounterResource> list(
  			Pageable pageable, PagedResourcesAssembler<String> pagedAssembler,
  			@RequestParam(value = "detailed", defaultValue = "false") boolean detailed,
  			@RequestParam(value = "from", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) DateTime from,
  			@RequestParam(value = "to", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) DateTime to,
  			@RequestParam(value = "resolution", defaultValue = "hour") AggregateCounterResolution resolution) {
  		List<String> names = new ArrayList<>(repository.list());
  		long count = names.size();
  		long pageEnd = Math.min(count, pageable.getOffset() + pageable.getPageSize());
  		Page aggregateCounterPage = new PageImpl<>(names.subList( toIntExact(pageable.getOffset()), toIntExact(pageEnd)), pageable, names.size());
  		PagedResources<AggregateCounterResource> resources = pagedAssembler.toResource(aggregateCounterPage, shallowAssembler);
  		if (detailed) {
  			to = providedOrDefaultToValue(to);
  			from = providedOrDefaultFromValue(from, to, resolution);
  			Interval interval = new Interval(from, to);
  			List<AggregateCounterResource> aggregateCounts = new LinkedList<>();
  			for (AggregateCounterResource aggregateCounterResource : resources) {
  				AggregateCounter aggregateCount = repository.getCounts(aggregateCounterResource.getName(), interval, resolution);
  				aggregateCounts.add(deepAssembler.toResource(aggregateCount));
  			}
  			return new PagedResources<>(aggregateCounts, resources.getMetadata());
  		}
  		return resources;
  	}
docs: List Counters that match the given criteria.
  
  @param pageable {@link Pageable}
  @param pagedAssembler {@link PagedResourcesAssembler}
  @param detailed detailed info
  @param from from date
  @param to to date
  @param resolution {@link AggregateCounterResolution}
  @return list counters