I'm working on a SaaS app where we've already separated the API from the front-end. Now, I'm considering opening up our API to allow third-party developers to build applications that extend our service. Should I set up a separate API endpoint, like api.example.com, just for external use, distinct from our internal API used by our web and mobile apps?
1 Answer
It really depends on your specific use case. If you can easily differentiate your public APIs from internal ones using paths, host names, or headers, then that would be a good approach. This way, you can load balance effectively and ensure that your internal API remains robust even under public traffic. Personally, I like to create a separate application for the public API so it can manage its own access rights, unless specific users need certain functionalities that the internal API already covers.

Exactly! I also prefer to keep them separate to avoid any issues with regular users if the public API gets overloaded. Plus, tracking public API resource usage can help determine if I need to adjust pricing for access.