anchor.diff:  			{error, 404}
   	end;
   get_usage("acct-" ++ _ = Id, [] = _Query) ->
  -	{ok, MaxItems} = application:get_env(ocs, rest_page_size),
   	try
   		["acct", TimeStamp, Serial] = string:tokens(Id, [$-]),
   		TS = list_to_integer(TimeStamp),
   		N = list_to_integer(Serial),
  -		case query_acct(TS, TS, '_', '_', '_', MaxItems) of
  +		case ocs_log:acct_query(start, TS, TS, '_', '_', '_') of
   			{error, _} ->
   				{error, 500};
   			{_, Events} ->
  
positive.code: 
  %% @hidden
  get_acct_query([] = _Query, Filters) ->
  	{ok, MaxItems} = application:get_env(ocs, rest_page_size),
  	Now = erlang:system_time(?MILLISECOND),
  	case query_acct(1, Now, '_', '_', '_', MaxItems) of
  		{0, []} ->
  			{error, 404};
  		{NumItems, Events} ->
  			JsonObj = usage_aaa_acct(Events, Filters),
  			JsonArray = {array, JsonObj},
  			Body = mochijson:encode(JsonArray),
  			N = integer_to_list(NumItems),
  			ContentRange = "items 1-" ++ N ++ "/" ++ N,
  			Headers = [{content_type, "application/json"},
  					{content_range, ContentRange}],
  
negative.code: get_acct_last(_Query, _Filters) ->
  	{error, 400}.
  
  