SlideShare a Scribd company logo
Demystifying API
Ashok Gautam
Agenda
API Introduction
RESTFul paradigm
Design, Development & Challenges
Best practices
Tools
Resources
Q&A
API:
Introduction
What is API
Evolution
Benefits
Introduction
API stands for Application Programming Interface. API
is a set of functions and procedures allowing the
creation of applications that access the features or data
of an operating system, application, or other service.
API is a software intermediary that allows two
applications to talk to each other.
APIs have existed for a long
time. Since the first
computer programs were
written, APIs have been
providing “contracts” for
information exchange
between programs.
XML-RPC
SOAP
RESTful
GraphQL
OS APIs
Platform APIs
Application APIs
Web APIs
Evolution
REST API Design & Development
REST API Design & Development
Why should you have API
Efficiency
Flexibility
Integrations
Security
Metered Usages
RESTful
A RESTful API is an application
program interface (API) that
uses HTTP requests to GET,
PUT, POST and DELETE data.
RESTful
Uniform interface
Client–server
Stateless
Cacheable
Layered system
https://www.bitnative.com/2012/08/26/how-restful-is-your-api/
Design, Development & Challenges
Design
Use nouns and NOT the verbs
Use of right HTTP methods
Use Plurals
Use parameters
Use proper HTTP codes
Versioning
Use Pagination
Supported Formats
Use Proper Error Messages
https://hackernoon.com/restful-api-design-step-by-step-guide-2f2c9f9fcdbf
OAS https://swagger.io/resources/open-api/
Development
Express.js
HAPI.JS
LoopBack
Swagger
Flask
Spring Boot
Postman
JMeter
Katalon
Kong
APIGEE
Swagger
Mulesoft
FireBase
Hello World
https://medium.com/@purposenigeria/build-a-restful-api-with-node-js-and-express-js-d7e59c7a3dfb
import express from 'express';import db from './db/db';
// Set up the express app
const app = express();
// get all todos
app.get('/api/v1/hello', (req, res) => {
res.status(200).send({
success: 'true',
message: 'Hello World',
todos: db
})});
const PORT = 5000;
app.listen(PORT, () => {
console.log(`server running on port ${PORT}`)
});
'use strict';
const Hapi=require('hapi');
// Create a server with a host
and port
const server=Hapi.server({
host:'localhost',
port:8000
});
// Add the route
server.route({
method:'GET',
path:'/hello',
handler:function(request,h) {
return'hello world';
}});
// Start the server
const start = async function() {
try {
await server.start();
}
catch (err) {
console.log(err);
process.exit(1);
}
console.log('Server running
at:', server.info.uri);
};
start();
Kong
● Cloud-Native
● Dynamic Load Balancing
● Hash-based Load Balancing
● Circuit-Breaker
● Health Checks
● Service Discovery
● Serverless
● WebSockets
● OAuth2.0
● Logging
● Security
● Syslog
● SSL
● Monitoring
● Forward Proxy
● Authentications
● Rate-limiting.
● Transformations
● Caching
● CLI
● REST API
● Geo-Replicated
● Failure Detection & Recovery
● Clustering
● Scalability
● Performance
● Plugins
Challenges
Security
Authentication & Authorization
Rate Limit
Scalability
Security
HTTPS
Access Control
Restrict HTTP methods
Input validation
Validate content types
Management endpoints
Error handling
Audit logs
Security headers
CORS
Sensitive information in HTTP requests
● Parameters Exploitation
● Identity Theft
● Abusing authorization system
● Man-In-The-Middle
● DOS & DDOS
Security
Authentication & Authorization
API keys
OAuth access tokens
JSON Web Tokens
https://zapier.com/engineering/apikey
-oauth-jwt/
● Use API keys if you expect developers to build internal
applications that don’t need to access more than a single user’s
data.
● Use OAuth access tokens if you want users to easily provide
authorization to applications without needing to share private
data or dig through developer documentation.
● Use JWT in concert with OAuth if you want to limit database
lookups and you don’t require the ability to immediately revoke
access.https://blog.restcase.com/restful-
api-authentication-basics/
API : Authentication
Rate Limit
User rate limits
IP/Network rate limits
Server rate limits
Regional data limits
Resource specific rate limits
Dynamic rate limits
Leaky Bucket
Fixed Window
Sliding Log
Sliding Window
express-rate-limit
hapi-ratelimiter
flask-limiter
Rate Limit
const rateLimit = require("express-rate-limit");
app.enable("trust proxy"); // only if you're behind
a reverse proxy (Heroku, Bluemix, AWS ELB, Nginx,
etc)
const apiLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100
});
app.use("/api/", apiLimiter);
Scaling
CDN
Application level caching
Database Caching
Cloudflare/
Cloudfront/Akamai
Varnish/NGINX
Redis/Memcache
https://hackernoon.com/restful-api-design-step-by-step-guide-2f2c9f9fcdbf
https://www.apiacademy.co/lessons/2015/04/api-design-101-api-design-basics
https://docs.microsoft.com/en-us/azure/architecture/best-practices/api-design
https://blog.mwaysolutions.com/2014/06/05/10-best-practices-for-better-restful-api/
Resources

More Related Content

What's hot (20)

PPTX
Introduction to REST - API
Chetan Gadodia
 
PPSX
Rest api standards and best practices
Ankita Mahajan
 
PPTX
An Introduction To REST API
Aniruddh Bhilvare
 
PPTX
B4USolution_API-Testing
b4usolution .
 
PPTX
API Design- Best Practices
Prakash Bhandari
 
PDF
Api presentation
Tiago Cardoso
 
PDF
Designing APIs with OpenAPI Spec
Adam Paxton
 
PPSX
API Test Automation
SQALab
 
PDF
Introduction to API
rajnishjha29
 
PPTX
Api types
Sarah Maddox
 
PPTX
Api Testing
Vishwanath KC
 
PPTX
Api testing
HamzaMajid13
 
PDF
API for Beginners
Sébastien Saunier
 
PPTX
Api Testing
Vishwanath KC
 
PPT
Understanding REST
Nitin Pande
 
PDF
OAuth & OpenID Connect Deep Dive
Nordic APIs
 
PDF
API Testing
Bikash Sharma
 
PDF
API_Testing_with_Postman
Mithilesh Singh
 
PPTX
API Testing Using REST Assured with TestNG
Siddharth Sharma
 
Introduction to REST - API
Chetan Gadodia
 
Rest api standards and best practices
Ankita Mahajan
 
An Introduction To REST API
Aniruddh Bhilvare
 
B4USolution_API-Testing
b4usolution .
 
API Design- Best Practices
Prakash Bhandari
 
Api presentation
Tiago Cardoso
 
Designing APIs with OpenAPI Spec
Adam Paxton
 
API Test Automation
SQALab
 
Introduction to API
rajnishjha29
 
Api types
Sarah Maddox
 
Api Testing
Vishwanath KC
 
Api testing
HamzaMajid13
 
API for Beginners
Sébastien Saunier
 
Api Testing
Vishwanath KC
 
Understanding REST
Nitin Pande
 
OAuth & OpenID Connect Deep Dive
Nordic APIs
 
API Testing
Bikash Sharma
 
API_Testing_with_Postman
Mithilesh Singh
 
API Testing Using REST Assured with TestNG
Siddharth Sharma
 

Similar to REST API Design & Development (20)

PPTX
Restful api
Anurag Srivastava
 
PPTX
REST-Api Design & Develop
Sabbir Rupom
 
PDF
How to Build, Manage, and Promote APIs
WSO2
 
PPTX
Secure rest api on microservices vws2016
Quý Nguyễn Minh
 
PDF
REST APIs
Arthur De Magalhaes
 
PDF
Creating a RESTful api without losing too much sleep
Mike Anderson
 
ODP
Attacking REST API
Siddharth Bezalwar
 
PDF
API Security: the full story
42Crunch
 
PDF
Grand tour of Azure API Management.pdf
Sherman37
 
PDF
apidays New York 2023 - Putting yourself out there - how to secure your publi...
apidays
 
PPTX
Enterprise Access Control Patterns for Rest and Web APIs
CA API Management
 
PDF
APIsecure 2023 - Time to Take the "F*^!" out of ShiFt Left, Christine Bevilac...
apidays
 
PPT
Securing RESTful API
Muhammad Zbeedat
 
PDF
What are restful web services?
Aparna Sharma
 
PPTX
Unit 3_detailed_automotiving_mobiles.pptx
VijaySasanM21IT
 
PDF
Techniques for securing rest
Sudhakar Anivella
 
PDF
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias
 
PPTX
Rest WebAPI with OData
Mahek Merchant
 
PDF
Api security-testing
n|u - The Open Security Community
 
PDF
Virtual Meetup - API Security Best Practices
Jimmy Attia
 
Restful api
Anurag Srivastava
 
REST-Api Design & Develop
Sabbir Rupom
 
How to Build, Manage, and Promote APIs
WSO2
 
Secure rest api on microservices vws2016
Quý Nguyễn Minh
 
Creating a RESTful api without losing too much sleep
Mike Anderson
 
Attacking REST API
Siddharth Bezalwar
 
API Security: the full story
42Crunch
 
Grand tour of Azure API Management.pdf
Sherman37
 
apidays New York 2023 - Putting yourself out there - how to secure your publi...
apidays
 
Enterprise Access Control Patterns for Rest and Web APIs
CA API Management
 
APIsecure 2023 - Time to Take the "F*^!" out of ShiFt Left, Christine Bevilac...
apidays
 
Securing RESTful API
Muhammad Zbeedat
 
What are restful web services?
Aparna Sharma
 
Unit 3_detailed_automotiving_mobiles.pptx
VijaySasanM21IT
 
Techniques for securing rest
Sudhakar Anivella
 
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias
 
Rest WebAPI with OData
Mahek Merchant
 
Api security-testing
n|u - The Open Security Community
 
Virtual Meetup - API Security Best Practices
Jimmy Attia
 
Ad

Recently uploaded (20)

PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Ad

REST API Design & Development