SlideShare a Scribd company logo
5
Most read
6
Most read
REpresentational State Transfer
(REST)
Tanay Sinha
Agenda
WEB SERVICES SOAP vs REST
ADVANTAGESHTTPS
HTTP Methods
Resource AugPAYLOAD
RESTFUL WEB
SERVICE
A Web Service is can be defined by following ways:
• is a client server application or application component for communication
• method of communication between two devices over network.
• is a collection of standards or protocols for exchanging information between
two devices or application.
About Web Services
• There are mainly two types of web services -
TYPES OF WEB SERVICES
SOAP
• Stands for simple object access
protocol
• SOAP is a protocol
• SOAP define standard to be strictly
followed
• SOAP can’t use REST because it a
protocol
• SOAP define xml format only
SOAP v/s REST
REST
• REST stands for Representational
State Transfer
• REST is a architectural Style
• REST doesn't define to much
standard like SOAP
• REST can use SOAP web services
because it is a concept and can use
any protocol like HTTP, SOAP.
• REST permits different data format
such as Plain text, HTML, XML,
JSON etc.
Restful Web Services
• A web service is a collection of open protocols and standards used for
exchanging data between applications or systems.
• Web services based on REST Architecture are known as RESTful Web
Services
• Rest web services use HTTP methods to implement the concept of REST
architecture. A RESTful web service usually defines a URI (Uniform
Resource Identifier), which is a service that provides resource
representation such as JSON and a set of HTTP Methods.
ADDRESSING
• Addressing refers to locating a resource or multiple resources lying on the
server.
• Each resource in REST architecture is identified by its URI (Uniform
Resource Identifier). A URI is of the following format −
• “<protocol>://<service-name>/<ResourceType>/<ResourceID>”
• Purpose of an URI is to locate a resource(s) on the server hosting the web
service.
HTTP METHOD
The following HTTP methods are most commonly used in a REST based
architecture.
▪ GET − Provides a read only access to a resource.
▪ POST − Used to create a new resource.
▪ DELETE − Used to remove a resource.
▪ PUT − Used to update an existing resource or create a new resource.
GET
• The GET method is used to retrieve information from the given server using
a given URI. Requests using GET should only retrieve data and should have
no other effect on the data.
POST
• the POST request method requests that a web server accept the data
enclosed in the body of the request message, most likely for storing it..
PUT
• Replaces all current representations of the target resource with the
uploaded content.
DELETE
• Removes all current representations of the target resource given by a URI.
STATELESSNESS
• RESTful Web Service should not keep a client state on the server. This
restriction is called Statelessness
• It is the responsibility of the client to pass its context to the server and then the
server can store this context to process the client's further request.
• Consider the following URL −
• “http://localhost:8080/UserManagement/rest/UserService/users/1”
• If you hit the above url using your browser or using a java based client or using
Postman, result will always be the User XML whose Id is 1 because the server
does not store any information about the client
• Display the Result in XML format
<user><id>1</id><name>xyz</name></user>
ADVANTAGE OF RESTFUL WEB
SERVICES
SECURITY
• As RESTful Web Services work with HTTP URL Paths, it is very important to
safeguard a RESTful Web Service in the same manner as a website is
secured.
• Following are the best practices to be adhered to while designing a RESTful
Web Service −
• Session Based Authentication − Use session based authentication to
authenticate a user whenever a request is made to a Web Service method.
• Validate Malformed XML/JSON − Check for well-formed input passed to a
web service method.
• No Sensitive Data in the URL − Never use username, password or session
token in a URL, these values should be passed to Web Service via the POST
method.
ADVANTAGE OF RESTFUL WEB
SERVICES
• The Payload section describes the data the server returns in response to a
request.
• The Payload return the data in JSON , XML or Text.
PAYLOAD
• XML Stands for eXtensible Markup Language.
• XML is a markup language much like HTML.
• XML was designed to store and transport data.
• XML uses more words than necessary
▪ Example of XML –
XML
• JSON Stands for JavaScript Object Notation.
• JSON is a syntax for Storing and exchanging data.
• JSON files are more human readable than XML.
• Example of JSON format-
JSON
Thank you
Thank You
Thankyou
GenX Info Technologies Pvt. Ltd.
411, 4th Floor, Bestech Cyber Park
National Highway-8
Gurgaon, Haryana, INDIA
www.gen-xt.com, sales@gen-xt.com
+91-124-2656001, +91-9810402267

More Related Content

DOC
Active browser web page
PPT
PHP - Introduction to Object Oriented Programming with PHP
PPT
Web Servers (ppt)
PPT
Class 5 - PHP Strings
PDF
REST API and CRUD
PPT
Query Decomposition and data localization
PPT
Chapter 02 php basic syntax
Active browser web page
PHP - Introduction to Object Oriented Programming with PHP
Web Servers (ppt)
Class 5 - PHP Strings
REST API and CRUD
Query Decomposition and data localization
Chapter 02 php basic syntax

What's hot (20)

PDF
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
PDF
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
PPTX
Ajax
PPT
PPT
PPTX
An Overview of Web Services: SOAP and REST
PPTX
Soap vs rest
PPT
WS-Privacy,
PPT
C#.NET
PPTX
Introduction to Web Technology
PPTX
PPTX
Jdbc ppt
PPTX
Concurrency control
PDF
Remote Method Invocation in JAVA
PPTX
2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript
PDF
Rest web services
PDF
Object oriented-systems-development-life-cycle ppt
PPTX
Web Standards And Protocols
PPTX
Active database
PPT
JDBC Architecture and Drivers
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Ajax
An Overview of Web Services: SOAP and REST
Soap vs rest
WS-Privacy,
C#.NET
Introduction to Web Technology
Jdbc ppt
Concurrency control
Remote Method Invocation in JAVA
2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript
Rest web services
Object oriented-systems-development-life-cycle ppt
Web Standards And Protocols
Active database
JDBC Architecture and Drivers
Ad

Similar to Rest webservice ppt (20)

PPT
REST Introduction.ppt
PPTX
Rest WebAPI with OData
PDF
REST API Recommendations
PPTX
Rest component demo
PDF
PPTX
Mini-Training: Let's have a rest
PPTX
PPTX
API Testing Using REST Assured with TestNG
PPTX
RESTful APIs
PPTX
Rest APIs Training
PDF
Unit v
PPT
ROA.ppt
PPTX
Rest & RESTful WebServices
PPTX
REST & RESTful Web Services
PDF
Ch 3: Web Application Technologies
PPT
Ch-1_.ppt
PPTX
SCWCD : The web client model
PDF
Best Practices in Web Service Design
PPTX
Restful webservice
PPTX
SCWCD : The web client model : CHAP : 1
REST Introduction.ppt
Rest WebAPI with OData
REST API Recommendations
Rest component demo
Mini-Training: Let's have a rest
API Testing Using REST Assured with TestNG
RESTful APIs
Rest APIs Training
Unit v
ROA.ppt
Rest & RESTful WebServices
REST & RESTful Web Services
Ch 3: Web Application Technologies
Ch-1_.ppt
SCWCD : The web client model
Best Practices in Web Service Design
Restful webservice
SCWCD : The web client model : CHAP : 1
Ad

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PDF
Electronic commerce courselecture one. Pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
Understanding_Digital_Forensics_Presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
Electronic commerce courselecture one. Pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
NewMind AI Monthly Chronicles - July 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25 Week I
Dropbox Q2 2025 Financial Results & Investor Presentation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf

Rest webservice ppt

  • 2. Agenda WEB SERVICES SOAP vs REST ADVANTAGESHTTPS HTTP Methods Resource AugPAYLOAD RESTFUL WEB SERVICE
  • 3. A Web Service is can be defined by following ways: • is a client server application or application component for communication • method of communication between two devices over network. • is a collection of standards or protocols for exchanging information between two devices or application. About Web Services
  • 4. • There are mainly two types of web services - TYPES OF WEB SERVICES
  • 5. SOAP • Stands for simple object access protocol • SOAP is a protocol • SOAP define standard to be strictly followed • SOAP can’t use REST because it a protocol • SOAP define xml format only SOAP v/s REST REST • REST stands for Representational State Transfer • REST is a architectural Style • REST doesn't define to much standard like SOAP • REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP. • REST permits different data format such as Plain text, HTML, XML, JSON etc.
  • 6. Restful Web Services • A web service is a collection of open protocols and standards used for exchanging data between applications or systems. • Web services based on REST Architecture are known as RESTful Web Services • Rest web services use HTTP methods to implement the concept of REST architecture. A RESTful web service usually defines a URI (Uniform Resource Identifier), which is a service that provides resource representation such as JSON and a set of HTTP Methods.
  • 7. ADDRESSING • Addressing refers to locating a resource or multiple resources lying on the server. • Each resource in REST architecture is identified by its URI (Uniform Resource Identifier). A URI is of the following format − • “<protocol>://<service-name>/<ResourceType>/<ResourceID>” • Purpose of an URI is to locate a resource(s) on the server hosting the web service.
  • 8. HTTP METHOD The following HTTP methods are most commonly used in a REST based architecture. ▪ GET − Provides a read only access to a resource. ▪ POST − Used to create a new resource. ▪ DELETE − Used to remove a resource. ▪ PUT − Used to update an existing resource or create a new resource.
  • 9. GET • The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data.
  • 10. POST • the POST request method requests that a web server accept the data enclosed in the body of the request message, most likely for storing it..
  • 11. PUT • Replaces all current representations of the target resource with the uploaded content.
  • 12. DELETE • Removes all current representations of the target resource given by a URI.
  • 13. STATELESSNESS • RESTful Web Service should not keep a client state on the server. This restriction is called Statelessness • It is the responsibility of the client to pass its context to the server and then the server can store this context to process the client's further request. • Consider the following URL − • “http://localhost:8080/UserManagement/rest/UserService/users/1” • If you hit the above url using your browser or using a java based client or using Postman, result will always be the User XML whose Id is 1 because the server does not store any information about the client • Display the Result in XML format <user><id>1</id><name>xyz</name></user> ADVANTAGE OF RESTFUL WEB SERVICES
  • 14. SECURITY • As RESTful Web Services work with HTTP URL Paths, it is very important to safeguard a RESTful Web Service in the same manner as a website is secured. • Following are the best practices to be adhered to while designing a RESTful Web Service − • Session Based Authentication − Use session based authentication to authenticate a user whenever a request is made to a Web Service method. • Validate Malformed XML/JSON − Check for well-formed input passed to a web service method. • No Sensitive Data in the URL − Never use username, password or session token in a URL, these values should be passed to Web Service via the POST method. ADVANTAGE OF RESTFUL WEB SERVICES
  • 15. • The Payload section describes the data the server returns in response to a request. • The Payload return the data in JSON , XML or Text. PAYLOAD
  • 16. • XML Stands for eXtensible Markup Language. • XML is a markup language much like HTML. • XML was designed to store and transport data. • XML uses more words than necessary ▪ Example of XML – XML
  • 17. • JSON Stands for JavaScript Object Notation. • JSON is a syntax for Storing and exchanging data. • JSON files are more human readable than XML. • Example of JSON format- JSON
  • 18. Thank you Thank You Thankyou GenX Info Technologies Pvt. Ltd. 411, 4th Floor, Bestech Cyber Park National Highway-8 Gurgaon, Haryana, INDIA www.gen-xt.com, sales@gen-xt.com +91-124-2656001, +91-9810402267