SlideShare a Scribd company logo
1 of 12
Contents
● What is an API ?
● How does an API Works ?
● Types of API Architectures
○ REST
○ SOAP
○ RPC
What is an API ?
API is the acronym for Application Programming Interface, which is
a software program that allows two applications to talk to each
other (mainly for exchanging data).
How does an API Works ?
How does an API Works ?
To learn more about what is an api and how does it work, let's start by describing a very
basic example. For this situation we have one client application which is also going to
be a website--now said website wants to include an authentication method for some
pages on their site.
There are two ways to implement authentication mechanism which are as follows :
● Method 1 : Building an authentication system from scratch - it will include features
like signing up, logging in, and resetting passwords.
● Method 2 : Using an API that has already been built, like Google's sign-in API, It
provides all the features you need - logins, registrations, forgotten passwords...
How does an API Works ?
Our goal is to understand how does API Works, So we will consider the Method - II
● Google Sign-in API provides a unique key to each website, which allows Google to
track any unauthorized actions made by our client application.
● Now, let us understand how Google SignIn API fulfilling our requirement. Firstly,
Our website will trigger the google SignIn API with a unique key that was assigned
to it, Now google SignIn API will check whether the request is valid or not if it is
valid then it will accept the request and interact with the Google database and
then send a response back to our website i.e., client_application
Types of API Architectures :
An API architecture is made up of a set of rules that all APIs should follow, which are
typically guidelines for what data an API shares with clients and how it sends/receives
information
The following are the most popular API architectures in use today :
● REST
● SOAP
● RPC
REST API
REST, which stands for representational state transfer, has become an increasingly
popular way to develop web APIs these days. REST is scalable, lightweight, and easy to
use – three features that make it great for creating an API.
SOAP
● SOAP stands for Simple Object Access Protocol which is used for transmitting data
across networks.
● SOAP is standardized by the World Wide Web Consortium (W3C) and utilizes XML to
encode information.
● SOAP strictly defines how messages should be sent and what must be included in
them. This makes SOAP APIs more secure than REST APIs.
RPC
● RPC stands for Remote Procedural Call
● RPC protocol is the most straightforward of the three architectures. Unlike REST
and SOAP which facilitate the transfer of data, RPC APIs invoke processes. In other
words, they execute scripts on a server.
● RPC APIs can handle either JSON (a JSON-RPC protocol) or XML (an XML-RPC
protocol) in their calls. XML is more secure than JSON, Though the RPC protocol is
strict, it’s a relatively simple and easy way to execute code on remote networks
Thank You
🌟Sharing Free Premium Code Snippets, Web Projects & API'S
🤘 Helping People to grow as a Full Stack Web Developer
🔮Have a look at my latest posts 👇
www.rahulvijayam.com

More Related Content

Similar to What is an API and How does it work

Fullstack Interview Questions and Answers.pdf
Fullstack Interview Questions and Answers.pdfFullstack Interview Questions and Answers.pdf
Fullstack Interview Questions and Answers.pdfcsvishnukumar
 
zendframework2 restful
zendframework2 restfulzendframework2 restful
zendframework2 restfultom_li
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptxRahulCR31
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptxRahulCR31
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryKaren Broughton-Mabbitt
 
An API (Application Programming Interface) is the means by which thi.pdf
An API (Application Programming Interface) is the means by which thi.pdfAn API (Application Programming Interface) is the means by which thi.pdf
An API (Application Programming Interface) is the means by which thi.pdfarakalamkah11
 
Best practices and advantages of REST APIs
Best practices and advantages of REST APIsBest practices and advantages of REST APIs
Best practices and advantages of REST APIsAparna Sharma
 
API (Application program interface)
API (Application program interface)API (Application program interface)
API (Application program interface)Muhammad Jahanzaib
 
Microservices&ap imanagement
Microservices&ap imanagementMicroservices&ap imanagement
Microservices&ap imanagementpramodkumards
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Vibhawa Nirmal
 
The Complete Guide to API Development in 2022.pdf
The Complete Guide to API Development in 2022.pdfThe Complete Guide to API Development in 2022.pdf
The Complete Guide to API Development in 2022.pdfConcetto Labs
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookKaty Slemon
 
Basic of API
Basic of APIBasic of API
Basic of APIRishanKP1
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & DevelopmentAshok Pundit
 

Similar to What is an API and How does it work (20)

Fullstack Interview Questions and Answers.pdf
Fullstack Interview Questions and Answers.pdfFullstack Interview Questions and Answers.pdf
Fullstack Interview Questions and Answers.pdf
 
zendframework2 restful
zendframework2 restfulzendframework2 restful
zendframework2 restful
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
REST and RESTful Services
REST and RESTful ServicesREST and RESTful Services
REST and RESTful Services
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
 
An API (Application Programming Interface) is the means by which thi.pdf
An API (Application Programming Interface) is the means by which thi.pdfAn API (Application Programming Interface) is the means by which thi.pdf
An API (Application Programming Interface) is the means by which thi.pdf
 
Application.pdf
Application.pdfApplication.pdf
Application.pdf
 
Best practices and advantages of REST APIs
Best practices and advantages of REST APIsBest practices and advantages of REST APIs
Best practices and advantages of REST APIs
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
 
API (Application program interface)
API (Application program interface)API (Application program interface)
API (Application program interface)
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
 
What is the Role of Laravel in API Development?
What is the Role of Laravel in API Development?What is the Role of Laravel in API Development?
What is the Role of Laravel in API Development?
 
Microservices&ap imanagement
Microservices&ap imanagementMicroservices&ap imanagement
Microservices&ap imanagement
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
 
The Complete Guide to API Development in 2022.pdf
The Complete Guide to API Development in 2022.pdfThe Complete Guide to API Development in 2022.pdf
The Complete Guide to API Development in 2022.pdf
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
 
Api Testing.pdf
Api Testing.pdfApi Testing.pdf
Api Testing.pdf
 
Basic of API
Basic of APIBasic of API
Basic of API
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

What is an API and How does it work

  • 1.
  • 2. Contents ● What is an API ? ● How does an API Works ? ● Types of API Architectures ○ REST ○ SOAP ○ RPC
  • 3. What is an API ? API is the acronym for Application Programming Interface, which is a software program that allows two applications to talk to each other (mainly for exchanging data).
  • 4. How does an API Works ?
  • 5. How does an API Works ? To learn more about what is an api and how does it work, let's start by describing a very basic example. For this situation we have one client application which is also going to be a website--now said website wants to include an authentication method for some pages on their site. There are two ways to implement authentication mechanism which are as follows : ● Method 1 : Building an authentication system from scratch - it will include features like signing up, logging in, and resetting passwords. ● Method 2 : Using an API that has already been built, like Google's sign-in API, It provides all the features you need - logins, registrations, forgotten passwords...
  • 6. How does an API Works ? Our goal is to understand how does API Works, So we will consider the Method - II ● Google Sign-in API provides a unique key to each website, which allows Google to track any unauthorized actions made by our client application. ● Now, let us understand how Google SignIn API fulfilling our requirement. Firstly, Our website will trigger the google SignIn API with a unique key that was assigned to it, Now google SignIn API will check whether the request is valid or not if it is valid then it will accept the request and interact with the Google database and then send a response back to our website i.e., client_application
  • 7. Types of API Architectures : An API architecture is made up of a set of rules that all APIs should follow, which are typically guidelines for what data an API shares with clients and how it sends/receives information The following are the most popular API architectures in use today : ● REST ● SOAP ● RPC
  • 8. REST API REST, which stands for representational state transfer, has become an increasingly popular way to develop web APIs these days. REST is scalable, lightweight, and easy to use – three features that make it great for creating an API.
  • 9. SOAP ● SOAP stands for Simple Object Access Protocol which is used for transmitting data across networks. ● SOAP is standardized by the World Wide Web Consortium (W3C) and utilizes XML to encode information. ● SOAP strictly defines how messages should be sent and what must be included in them. This makes SOAP APIs more secure than REST APIs.
  • 10. RPC ● RPC stands for Remote Procedural Call ● RPC protocol is the most straightforward of the three architectures. Unlike REST and SOAP which facilitate the transfer of data, RPC APIs invoke processes. In other words, they execute scripts on a server. ● RPC APIs can handle either JSON (a JSON-RPC protocol) or XML (an XML-RPC protocol) in their calls. XML is more secure than JSON, Though the RPC protocol is strict, it’s a relatively simple and easy way to execute code on remote networks
  • 11.
  • 12. Thank You 🌟Sharing Free Premium Code Snippets, Web Projects & API'S 🤘 Helping People to grow as a Full Stack Web Developer 🔮Have a look at my latest posts 👇 www.rahulvijayam.com