SlideShare a Scribd company logo
1 of 12
An Introduction to
ReSTful APIs
By: Claudine Bruyns
The History of ReST
• Roy Fielding
– 2000 Dissertation
“Architectural Styles and the Design of
Network-based Software Architectures”
• ReST is Conceptual
Important Terms
• ReST – Representational State Transfer
• API – Application Programming
Interface
• CRUD – Create, Read, Update, Delete
based on Hyper Text Transfer Protocol
Actions
– Implemented using GET, POST, PUT, and
DELETE
What does ReST do?
• ReST defines how a client and server
will exchange and represent information
about a resource.
– A resource is simply any piece of
information that can be named. Such as
documents, images, services, and data.
Components of ReST
• Constraints
– Provide the framework for implementation
of the API
• Elements
– Are used for the request and response for
access to information
• Connectors
– Initiate the communication
ReST – 6 Constraints
• Client/Server
– Separates data storage from user interface
• Stateless
– Session state resides on client, the server
stores no session data
• Cacheable
– Allows data to be stored with the option for
the client to refuse
Constraints continued
• Uniform Interface
– Standardizes the form of the information
transferred
• Layered
– Encapsulated data allowing security
policies to be enforced
• Code on Demand
– Optional, but allows scripts to be used on
the client side
ReST 6 Data Elements
• Resource
– The target of the http reference
• Resource Identifier
– The link to the resource
• Representation
– The data type associated with the resource
such as: JPEG images or HTML
documents
Data Elements continued
• Representation metadata
– Attributes that help define the
representation
• Resource metadata
– Attributes that help define the resource
• Control data
– Identifies the purpose of the message
ReST Connectors
• Client
– Initiates by making a request
• Sever
– Listens and responds to client requests
• Cache
– Saves responses to be used later
• Resolver
– Translates the resource identifier into a network
address
• Tunnel
– Allows clients to communicate directly with the server
ReST API Example
Client Request:
GET http://www.thomas-bayer.com/sqlrest/CUSTOMER/3/
Server Response:
<CUSTOMER xmlns:xlink="http://www.w3.org/1999/xlink">
<ID>3</ID>
<FIRSTNAME>Michael</FIRSTNAME>
<LASTNAME>Clancy</LASTNAME>
<STREET>542 Upland Pl.</STREET>
<CITY>San Francisco</CITY>
</CUSTOMER>
Conclusion
• ReSTful APIs are used extensively
• 8,000+ APIs available
– http://www.programmableweb.com/apis/directory
• Everyday Examples:
– Social Media – Twitter and Facebook
– Banking web applications
– Electronic Medical Records
• ReSTful APIs are a mainstay in today’s
data driven world.

More Related Content

What's hot

Gateways 2020 Tutorial - Large Scale Data Transfer with Globus
Gateways 2020 Tutorial - Large Scale Data Transfer with GlobusGateways 2020 Tutorial - Large Scale Data Transfer with Globus
Gateways 2020 Tutorial - Large Scale Data Transfer with GlobusGlobus
 
Multi-agent interactions on the Web through Linked Data Notifications
Multi-agent interactions on the Web through Linked Data NotificationsMulti-agent interactions on the Web through Linked Data Notifications
Multi-agent interactions on the Web through Linked Data NotificationsJean-Paul Calbimonte
 
Bringing Decentralization to Collaboration
Bringing Decentralization to CollaborationBringing Decentralization to Collaboration
Bringing Decentralization to CollaborationSamer Hassan
 
Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8Woodruff Solutions LLC
 
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013Woodruff Solutions LLC
 
Intoduction to web services
Intoduction to web servicesIntoduction to web services
Intoduction to web servicesAhmed Gamil
 
Group meeting may 16 2013
Group meeting   may 16 2013Group meeting   may 16 2013
Group meeting may 16 2013jalle6
 
Connecting Your System to Globus (APS Workshop)
Connecting Your System to Globus (APS Workshop)Connecting Your System to Globus (APS Workshop)
Connecting Your System to Globus (APS Workshop)Globus
 
Elasticsearch - Scalability and Multitenancy
Elasticsearch - Scalability and MultitenancyElasticsearch - Scalability and Multitenancy
Elasticsearch - Scalability and MultitenancyBozhidar Bozhanov
 
Why EDP Chose MongoDB
Why EDP Chose MongoDBWhy EDP Chose MongoDB
Why EDP Chose MongoDBMongoDB
 
rest without put
rest without putrest without put
rest without putXiaojun REN
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
Content Registration at Crossref - LIVE Kuala Lumpur
Content Registration at Crossref - LIVE Kuala LumpurContent Registration at Crossref - LIVE Kuala Lumpur
Content Registration at Crossref - LIVE Kuala LumpurCrossref
 
Encryption in the enterprise
Encryption in the enterpriseEncryption in the enterprise
Encryption in the enterpriseBozhidar Bozhanov
 

What's hot (20)

Gateways 2020 Tutorial - Large Scale Data Transfer with Globus
Gateways 2020 Tutorial - Large Scale Data Transfer with GlobusGateways 2020 Tutorial - Large Scale Data Transfer with Globus
Gateways 2020 Tutorial - Large Scale Data Transfer with Globus
 
Multi-agent interactions on the Web through Linked Data Notifications
Multi-agent interactions on the Web through Linked Data NotificationsMulti-agent interactions on the Web through Linked Data Notifications
Multi-agent interactions on the Web through Linked Data Notifications
 
Bringing Decentralization to Collaboration
Bringing Decentralization to CollaborationBringing Decentralization to Collaboration
Bringing Decentralization to Collaboration
 
Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8
 
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
 
Intoduction to web services
Intoduction to web servicesIntoduction to web services
Intoduction to web services
 
Generic Crawler
Generic CrawlerGeneric Crawler
Generic Crawler
 
Sept 24 NISO Virtual Conference: Library Data in the Cloud
Sept 24 NISO Virtual Conference: Library Data in the CloudSept 24 NISO Virtual Conference: Library Data in the Cloud
Sept 24 NISO Virtual Conference: Library Data in the Cloud
 
Web Services and OGSA
Web Services and OGSAWeb Services and OGSA
Web Services and OGSA
 
Group meeting may 16 2013
Group meeting   may 16 2013Group meeting   may 16 2013
Group meeting may 16 2013
 
Connecting Your System to Globus (APS Workshop)
Connecting Your System to Globus (APS Workshop)Connecting Your System to Globus (APS Workshop)
Connecting Your System to Globus (APS Workshop)
 
Sept 24 NISO Virtual Conference: Library Data in the Cloud
Sept 24 NISO Virtual Conference: Library Data in the CloudSept 24 NISO Virtual Conference: Library Data in the Cloud
Sept 24 NISO Virtual Conference: Library Data in the Cloud
 
Elasticsearch - Scalability and Multitenancy
Elasticsearch - Scalability and MultitenancyElasticsearch - Scalability and Multitenancy
Elasticsearch - Scalability and Multitenancy
 
Why EDP Chose MongoDB
Why EDP Chose MongoDBWhy EDP Chose MongoDB
Why EDP Chose MongoDB
 
Sept 24 NISO Virtual Conference: Library Data in the Cloud
Sept 24 NISO Virtual Conference: Library Data in the CloudSept 24 NISO Virtual Conference: Library Data in the Cloud
Sept 24 NISO Virtual Conference: Library Data in the Cloud
 
rest without put
rest without putrest without put
rest without put
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
Content Registration at Crossref - LIVE Kuala Lumpur
Content Registration at Crossref - LIVE Kuala LumpurContent Registration at Crossref - LIVE Kuala Lumpur
Content Registration at Crossref - LIVE Kuala Lumpur
 
Proxy server
Proxy serverProxy server
Proxy server
 
Encryption in the enterprise
Encryption in the enterpriseEncryption in the enterprise
Encryption in the enterprise
 

Similar to ReSTfulAPIs

Similar to ReSTfulAPIs (20)

An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
 
REST Basics
REST BasicsREST Basics
REST Basics
 
ReSTful API Final
ReSTful API FinalReSTful API Final
ReSTful API Final
 
Design patternsforiot
Design patternsforiotDesign patternsforiot
Design patternsforiot
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 
Rest
RestRest
Rest
 
Restful webservice
Restful webserviceRestful webservice
Restful webservice
 
Overview of REST - Raihan Ullah
Overview of REST - Raihan UllahOverview of REST - Raihan Ullah
Overview of REST - Raihan Ullah
 
Rest introduction
Rest introductionRest introduction
Rest introduction
 
Rest APIs Training
Rest APIs TrainingRest APIs Training
Rest APIs Training
 
Introduction to Restful Web Services
Introduction to Restful Web ServicesIntroduction to Restful Web Services
Introduction to Restful Web Services
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
Introduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptxIntroduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptx
 
Introduction to Web Services
Introduction to Web ServicesIntroduction to Web Services
Introduction to Web Services
 
On being RESTful
On being RESTfulOn being RESTful
On being RESTful
 
Web
WebWeb
Web
 
Rest webservice ppt
Rest webservice pptRest webservice ppt
Rest webservice ppt
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
RESTful Web Service using Swagger
RESTful Web Service using SwaggerRESTful Web Service using Swagger
RESTful Web Service using Swagger
 

ReSTfulAPIs

  • 1. An Introduction to ReSTful APIs By: Claudine Bruyns
  • 2. The History of ReST • Roy Fielding – 2000 Dissertation “Architectural Styles and the Design of Network-based Software Architectures” • ReST is Conceptual
  • 3. Important Terms • ReST – Representational State Transfer • API – Application Programming Interface • CRUD – Create, Read, Update, Delete based on Hyper Text Transfer Protocol Actions – Implemented using GET, POST, PUT, and DELETE
  • 4. What does ReST do? • ReST defines how a client and server will exchange and represent information about a resource. – A resource is simply any piece of information that can be named. Such as documents, images, services, and data.
  • 5. Components of ReST • Constraints – Provide the framework for implementation of the API • Elements – Are used for the request and response for access to information • Connectors – Initiate the communication
  • 6. ReST – 6 Constraints • Client/Server – Separates data storage from user interface • Stateless – Session state resides on client, the server stores no session data • Cacheable – Allows data to be stored with the option for the client to refuse
  • 7. Constraints continued • Uniform Interface – Standardizes the form of the information transferred • Layered – Encapsulated data allowing security policies to be enforced • Code on Demand – Optional, but allows scripts to be used on the client side
  • 8. ReST 6 Data Elements • Resource – The target of the http reference • Resource Identifier – The link to the resource • Representation – The data type associated with the resource such as: JPEG images or HTML documents
  • 9. Data Elements continued • Representation metadata – Attributes that help define the representation • Resource metadata – Attributes that help define the resource • Control data – Identifies the purpose of the message
  • 10. ReST Connectors • Client – Initiates by making a request • Sever – Listens and responds to client requests • Cache – Saves responses to be used later • Resolver – Translates the resource identifier into a network address • Tunnel – Allows clients to communicate directly with the server
  • 11. ReST API Example Client Request: GET http://www.thomas-bayer.com/sqlrest/CUSTOMER/3/ Server Response: <CUSTOMER xmlns:xlink="http://www.w3.org/1999/xlink"> <ID>3</ID> <FIRSTNAME>Michael</FIRSTNAME> <LASTNAME>Clancy</LASTNAME> <STREET>542 Upland Pl.</STREET> <CITY>San Francisco</CITY> </CUSTOMER>
  • 12. Conclusion • ReSTful APIs are used extensively • 8,000+ APIs available – http://www.programmableweb.com/apis/directory • Everyday Examples: – Social Media – Twitter and Facebook – Banking web applications – Electronic Medical Records • ReSTful APIs are a mainstay in today’s data driven world.

Editor's Notes

  1. I chose to research ReSTful APIs because the company I work for uses them in the electronic medical record software that we develop and support. I wanted to know more about ReST and APIs so that as they become more widely used I would have a fundamental understating of what they are and what they do.
  2. Roy Fielding’s dissertation in 2000 brought forth a new framework called Representational State Transfer also know as ReSTful. ReST is an architecture or framework behind the exchange of information using application programming interfaces. During the following presentation we will be introduced the fundamental aspects of ReST. ReST is more of a concept or a set of best practices, rather than something concrete which makes it somewhat difficult to grasp.
  3. Stateless – Advantages: reliability, visibility and scalability. Disadvantages: Decreased network performance due to repetitive data transfers Cacheable – Advantages: reduces repetitive data transfers which increases network performance. Disadvantages: Data may become stale
  4. Uniform Interface – Advantages: Conforms to the architectural principles of generality, and simplicity. Disadvantages: may not be as efficient as other forms of data transfer Layered – Advantages: provides data security. Disadvantages: may increase system latency. Code on Demand – Allow scripts to manipulate the data to be represented in a meaningful way. Disadvantages: Depending on the organizations security policies, scripts may not be allowed.
  5. Resource – data that can be named as we discussed in slide 4 Resource Identifier – the URL of the resource being requested Representation – may also be XML, JSON, hCard or any other defined representations
  6. Lets put it all together using an example: The request contains the purpose of the message GET It also contains the target Customer 3 Using the resource identifier http://www.thomas-bayer.com The response shows what type of representation, in this case XML The resource metadata which is the information that defines the customer
  7. In their book Restful Java Web Services: Master Core REST Concepts And Create Restful Web Services In Java, Sandoval, Roussev and Wallace describe ReST like this: “In their simplest form, ReSTful web services are networked applications that manipulate the state of resources. In this context, resource manipulation means resource creation, retrieval, update, and deletion. However, ReSTful web services are not limited to just these four basic data manipulation concepts.”