Refactor get_endpoints to operate from the same data structure as get_token.
sketch of core mimic resources
just start breaking stuff