KEMBAR78
What is an API and How does it work | PPTX
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

What is an API and How does it work

  • 2.
    Contents ● What isan API ? ● How does an API Works ? ● Types of API Architectures ○ REST ○ SOAP ○ RPC
  • 3.
    What is anAPI ? 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 anAPI Works ?
  • 5.
    How does anAPI 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 anAPI 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 APIArchitectures : 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, whichstands 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 standsfor 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 standsfor 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
  • 12.
    Thank You 🌟Sharing FreePremium 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