Base endpoint definition

Fixes #461