I'm currently exploring the world of APIs and I have a few questions that are puzzling me.
Question1: I understand that APIs facilitate communication between different applications. But why would a company need an API for internal use? For example, if XYZ company has a Java/JS application that accesses data using its own internal API, what is the purpose of having an API when the resource is within the same company? Additionally, should such an API be RESTful or SOAP-based?
Question2: Imagine I have users interacting with my API "x1" which connects to database "d1" with schema "s1". If I were to transition to a new database "d2" with schema "s2" and a new API "x2", how can I ensure a seamless transition for my users without them being aware of the changes? How can this migration be done transparently?
Question3:
Furthermore, what does it mean when they say "REST can be cached"? Can you provide an example to illustrate this concept? Are REST and SOAP the only types of APIs available?
These questions were posed to me recently, and I found myself struggling to provide clear answers. Can someone shed some light on these topics and help clarify my confusion?