added api implementation to get contacts by resource