Get endpoint from within dict

Fixes #2