anchor.diff:  get_acct_last(_Query, _Filters) ->
   	{error, 400}.
   
  +-spec range(Range) -> {Start, End}
  +	when
  +		Range :: string(),
  +		Start :: pos_integer(),
  +		End :: pos_integer().
  +%% @doc Parse Range request header.
  +%% @private
  +range(Range) when is_list(Range) ->
  +	try
  +		["item", S, E] = string:tokens(Range, " -"),
  +		{list_to_integer(S), list_to_integer(E)}
  +	catch
  +		_:_ ->
  +			{ok, MaxItems} = application:get_env(ocs, rest_page_size),
  +			{1, MaxItems}
  +	end.
  +
  
positive.code: 		_:_Reason1 ->
  			{error, 404}
  	end;
  get_usage("acct-" ++ _ = Id, [] = _Query) ->
  	try
  		["acct", TimeStamp, Serial] = string:tokens(Id, [$-]),
  		TS = list_to_integer(TimeStamp),
  
negative.code: 	end.
  
  %% @hidden
  get_auth_usage(Query, Headers) ->
  	case lists:keytake("fields", 1, Query) of
  		{value, {_, L}, NewQuery} ->
  			Filters = string:tokens(L, ","),
  			get_auth_usage(NewQuery, Filters, Headers);
  		false ->
  			get_auth_usage(Query, [], Headers)
  	end.
  %% @hidden
  get_auth_usage(Query, Filters, Headers) ->
  	case lists:keytake("sort", 1, Query) of
  		{value, {_, "-date"}, NewQuery} ->
  			get_auth_last(NewQuery, Filters);
  		{value, {_, Date}, NewQuery}
  				when Date == "date"; Date == "+date" ->
  			get_auth_query(NewQuery, Filters, Headers);
  		false ->
  			get_auth_query(Query, Filters, Headers);
  		_ ->
  			{error, 400}
  	end.
  
  %% @hidden
  get_auth_query(Query, Filters, Headers) ->
  	case {lists:keyfind("if-range", 1, Headers),
  			lists:keyfind("range", 1, Headers)} of
  		{{_, Etag}, {_, Range}} ->
  			case global:whereis_name(Etag) of
  				undefined ->
  					{Start, End} = range(Range),
  					get_auth_query_start(Query, Filters, Start, End);
  				PageServer ->
  					{Start, End} = range(Range),
  					get_auth_query_page(PageServer, Etag, Filters, Start, End)
  			end;
  		{{_, _Etag}, false} ->
  			{error, 400};
  		{false, {_, Range}} ->
  			{Start, End} = range(Range),
  			get_auth_query_start(Query, Filters, Start, End);
  		{false, false} ->
  			{ok, MaxItems} = application:get_env(ocs, rest_page_size),
  			get_auth_query_start(Query, Filters, 1, MaxItems)
  	end.
  
  %% @hidden
  get_auth_query_start([] = _Query, Filters, RangeStart, RangeEnd) ->
  	Now = erlang:system_time(?MILLISECOND),
  	case supervisor:start_child(ocs_rest_pagination_sup,
  			[[ocs_log, auth_query, [1, Now, '_', '_', '_', '_']]]) of
  		{ok, PageServer, Etag} ->
  			get_auth_query_page(PageServer, Etag, Filters, RangeStart, RangeEnd);
  		{error, _Reason} ->
  			{error, 500}
  	end.
  
  %% @hidden
  get_auth_query_page(PageServer, Etag, Filters, Start, End) ->
  	case gen_server:call(PageServer, {Start, End}) of
  		{error, _Reason} ->
  			{error, 500};
  