Not using the physical “api” folder does not mean the route /api/{action} is not used. (Route is not physical path.) In fact, there is many API actions being used, including lookup. 502 is Bad Gateway error, make sure:
- URL rewrite of your web server is properly set up, especially if you use Nginix web server,
- Lookup user level permission is enabled for the user, if you use User Level Security.
- Enable Debug and check HTTP response and the log to find the server error.