What is an API?
Last updated
Was this helpful?
Last updated
Was this helpful?
Application Programming Interfaces (APIs) allow applications/servers to connect to each other (Figure 1). APIs are predictable, i.e., they follow a set structure and they usually return JSON data. APIs differ from traditional websites as the former use routing and the latter use files (Figure 2).
There are also Batched APIs: multiple RESTful or GraphQL API requests embdeddded into a single piece of JSON. These are common in mobile applications.
RESTful (REpresentational State Transfer) APIs are stateless, i.e., each request includes all required information that the server needs. In layman's terms this is how they work:
The client makes a request for some specific data.
The server creates an object based on this request.
The server sends the "state" of this object as a response to the client.