added get_endpoint functionality

and additionally a get_or_register_endpoint method