Skip to main content

๐Ÿ”— API

API stands for Application Programming Interface. It allows two applications to talk to each other.

APIs are needed to help applications better communicate with each other and make tasks for us simpler to understand. It also helps with productivity.

Across the internet, many websites and apps can integrate with third-party providers and this is achieved by using an Application Programming Interface.

APIs make sharing knowledge on the internet simpler for companies and communities. They are used by Facebook, Twitter, Youtube and other websites to connect their services. - APIs are not visible to the end user

Examples

Some common API examples include:
- Paying using your phone
- Google maps
- E-commerce
- Weather snippets
- Login using Google, Twitter, Facebook etc
- Holiday planning site

Types

Open APIs

Also known as Public APIs
Developers can openly use Open APIs
They may require registration or an API key, or they may be free. - In order to gain access to data or facilieies, they focus on external users.

Partner APIs

Not accessible to the general public and need special authorisation
These are most visible and they are used to interact outside a comapny's borders

Internal APIs

Also known as private APIs
Accessible by only internal systems and are shielded from external users

Composite APIs

These combine multiple data or service APIs into one
Developers may us hem to make a single call to multiple endpoints

Protocols

When an API makes a call, a protocol defines the rules. It defines the data types and commands that are appropriate

REST

Representational State Transfer
This is a web services API
Modern web applications such as Netflix, Uber, Amazon and other depend heavily on REST APIs

SOAP

Simple Object Access Protocol
This is a well known protocol, that is also a web API
SOAP was the first protocol to standardise how applications could handle resources over network connections

RPC

Remote Procedural Call
This was the earliest and most basic in APIs
It's aim was to allow a client to run code on a server