API
| A | Application |
| P | Programming |
| I | Interface |
Allows other programs or application to use functionality that you expose:
- Functions
- Protocols
- Objects
Weather Data Example
Section titled “Weather Data Example”Request:
GET https://www.7timer.info/bin/astro.php?lon=15.593063&lat=48.411018&ac=0&unit=metric&output=jsonResponse:
HTTP/1.1 200 OKContent-Type: application/json
{ "product": "civil", "init": "2023070206", "dataseries": [ { "cloudcover": 7, "temp2m": 21, "rh2m": "63%", "wind10m": { "direction": "W", "speed": 3 }, ... ]}API Use-Cases
Section titled “API Use-Cases”- Frontend - Backend Communication
- Component Comunication
- e.g. One Service calls another service
- DaaS
Frontend-Backend
Section titled “Frontend-Backend”
Using APIs, you can link any software parts, potentially using different technologies, as long as they support the same protocol.
Component Communication
Section titled “Component Communication”Protocols
Section titled “Protocols”There are several common protocols used in APIs.
Attributes of protocols
Section titled “Attributes of protocols”Protocols …
- allow exchange of messages and information between 2 processes.
- Processes don’t need to be on the same physical machine. Can be distributed and communicate over network.
- are open to any technology or programming language.
- have a clear specification.