Rest API Fundamentals
Rest API Fundamentals
A Beginner’s Guide
API A software intermediary that allows two
applications to talk to each other. APIs are
Application Programming an accessible way to extract and share data
Interface within and across organizations.
Example: http://sefism.vercel.app
Request Anatomy Every URL is a URI, but not
every URI is also a URL
REST API Request
Example: http://sefism.vercel.app/emails?
community=slack
URI highlighted
in white
Request Example
{
“email”:”[email protected]
”
“community”:”sefism”
“isJoined”:”true”
}
Parameters There are two types of
parameters, Query & Path.
Request Parameters
Example: http://sefism.vercel.app/emails?community=slack
Example: http://sefism.vercel.app/helpful-resources/beginner/interviewtips
Query Parameters community=slack is a query
paramter (variable) which retrieves
emails for slack community
Request Parameters
Type
Example: http://sefism.vercel.app/emails?community=slack
Path Parameters beginner is the path parameter
(variable) which points to
interviewtips of beginner levels
Request Parameters
Type
Example: http://sefism.vercel.app/helpful-resources/beginner/interviewtips
Headers Used to send extra data, specifying
proper format and data to retrieve
Request Headers
Request Header
GET
POST
Retrieve information
about an API resource. Create an API resource.
PUT
DELETE
1XX : Information
2XX : Success
3XX : Redirection
4XX : Client Error
5XX : Server Error
Why REST APIs
Advantages of RESTful
APIs
Simplicity and
Clarity
Advantages of RESTful
APIs
Flexibility and
Scalability
Advantages of RESTful
APIs
Interoperability and
Openness
Advantages of RESTful
APIs
Maintainability and
Reliability
Scalability and flexibility: Can handle various Resource-intensive tasks: Transferring large files or
applications and scale with increasing traffic and data streams may be more efficient with
data volumes. specialized protocols like FTP or WebDAV.
High-performance remote
procedure calls optimized for gRPC
microservices communication.
Continuous bi-directional
Web Sockets communication between client
and server.
Like and Share