API
Introduction
APIs, or Application Programming Interfaces, are the way applications interact with eachother.
Introduction to APIs
APIs are the new normal in modern cloud-native architectures, and appear more and more elsewhere too. Hence they deserve their own spot in the tech-stack, even although you can argue the are just a combination of the other elements
- user experience? -yes the way APIs are built determines what the experience is like... the only difference is the experience is tailored to another system rather than a person
- data? - yes, APIs are very strict on how they handle data. This is often referred to as a "contract" between systems where they care very much about sharing data in a very defined way
- application? - yes, you develop and run an API in a way which is very much like a website
- platform? - yes, you need to host them, run them, secure them... just like other solutions
- infrastructure? - yes, they use the same technologies
Ok, so why their own spot? Whilst three-quarters of doing APIs is very similar to other applications and solutions, that last quarter is all about how to do API specific stuff and recognise that in today's architectures APIs also act as connectors between the other elements of the tech stack. For example, in the old days, a website connected directly to the database serving the website. Now that same database is used by the website, the user's natiive mobile app, another application, monitoring systems etc... so now the API is the common interface to the database for all those different apps.
An Application Programming Interface (API) is a set of rules or protocols that enables different software applications to communicate with each other. It acts as a bridge between systems, allowing them to exchange data, features, and functionality in a structured and standardized way[1][3][6].
Key Characteristics of APIs
- Communication: APIs facilitate communication between a client (the application making a request) and a server (the application providing the response)[1][3].
- Data Exchange: They allow for the exchange of data, services, and capabilities between applications without requiring each application to develop these functionalities from scratch[3][4].
- Security: APIs help maintain system security by exposing only necessary information and hiding internal system details[3].
- Types: There are several types of APIs, including SOAP, RPC, Websocket, and REST, each with its own method of data exchange and communication style[1].
How APIs Work
- Request: A client application sends a request to a server through an API.
- Processing: The server processes the request and performs the necessary actions.
- Response: The server sends a response back to the client.
- Interpretation: The client interprets the response and presents the data to the user in a readable format[4].
Examples of API Use
- Weather Apps: A weather app on your phone uses an API to fetch weather data from a weather service's server[1].
- Payment Processing: E-commerce sites use APIs to connect with payment services like PayPal for transactions[3].
- Rideshare Apps: Apps like Uber use APIs to connect users with drivers and manage ride requests[4].
Citations: [1] https://aws.amazon.com/what-is/api/ [2] https://en.wikipedia.org/wiki/API [3] https://www.ibm.com/think/topics/api [4] https://www.mulesoft.com/api/what-is-an-api [5] https://www.altexsoft.com/blog/what-is-api-definition-types-specifications-documentation/ [6] https://www.postman.com/what-is-an-api/ [7] https://www.talend.com/resources/what-is-an-api/ [8] https://enterprisersproject.com/article/2018/11/how-explain-apis-plain-english