Make changes to api naming scheme add some error checking around endpoints for missing/invalid endpoints