Create an api function for finding the restul handler by path.