Spike for a new API for declaring endpoints

what about having this inside base view init method?