entry_endpoints: use a switch statement to build up the query