SlideShare a Scribd company logo
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

PPT
Rest introduction
PPT
Introduction to REST
PPTX
CLOVER: PROPERTY GRAPH BASED METADATA MANAGEMENT SERVICE
PPTX
FaunaDB security
PPTX
.Net Distributed Caching
PPTX
Introduction to Fauna
PPTX
Gateways 2020 Tutorial - Automated Data Ingest and Search with Globus
PPTX
Gateways 2020 Tutorial - Instrument Data Distribution with Globus
Rest introduction
Introduction to REST
CLOVER: PROPERTY GRAPH BASED METADATA MANAGEMENT SERVICE
FaunaDB security
.Net Distributed Caching
Introduction to Fauna
Gateways 2020 Tutorial - Automated Data Ingest and Search with Globus
Gateways 2020 Tutorial - Instrument Data Distribution with Globus

What's hot (20)

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

Similar to ReSTfulAPIs (20)

PDF
ReSTful API Final
PPTX
REST and RESTful Services
PDF
Rest Vs Soap Yawn2289
PDF
RESTful applications: The why and how by Maikel Mardjan
PDF
Restful风格ž„web服务架构
PDF
IRJET- Rest API for E-Commerce Site
PDF
ReST Vs SOA(P) ... Yawn
PPTX
A REST API (also called a RESTful API or RESTful web API) is an application p...
PDF
A Deep Dive into REST API Framework Survey
PPTX
Rest surekha
PDF
PDF
REST - Representational State Transfer
PPTX
Lecture 12
PPTX
REST & RESTful Web Services
PPT
emilio.ppt
PPT
emilio.ppt
PPTX
REST API
PPTX
RESTful Architecture
PPTX
REST API
ReSTful API Final
REST and RESTful Services
Rest Vs Soap Yawn2289
RESTful applications: The why and how by Maikel Mardjan
Restful风格ž„web服务架构
IRJET- Rest API for E-Commerce Site
ReST Vs SOA(P) ... Yawn
A REST API (also called a RESTful API or RESTful web API) is an application p...
A Deep Dive into REST API Framework Survey
Rest surekha
REST - Representational State Transfer
Lecture 12
REST & RESTful Web Services
emilio.ppt
emilio.ppt
REST API
RESTful Architecture
REST API
Ad

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

  • #2: 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.
  • #3: 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.
  • #7: 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
  • #8: 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.
  • #9: 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
  • #12: 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
  • #13: 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.”