rest service to access mongodb api