Start set up of endpoint
Refactored to use prototypes MORE
get endpoint by path and id