api wrapper for mongoose