Example #2 of the endpoint creation tutorial