SlideShare uma empresa Scribd logo
1 de 38
REST
Assured
Yaniv Rodenski
Senior Consultant, Sela Group

http://blogs.microsoft.co.il/blogs/roadan
Twitter: @YRodenski
A brief history of The Web API




                        March 2012
                                               ASP.NET is
                                               Open Source
6 Preview Versions
                     Fab 2012
                                      ASP.NET Web
                                      API (Beta)
         October 2010
                                WCF Web API
                                on Code Plex
State of the web
• Today the web faces new challenges:
  – Internet scale applications



  – Cloud operating systems
State of the web
• Today the web faces new challenges:
  – Even more complex integrations
State of the web
• Today the web faces new challenges:
  – Broader reach of clients
Agenda

• Basic terminology
• REST via the ASP.NET Web API
  – Richardson maturity model
  – Hypermedia Patterns
  – Media types
• Caching
SOAP
• Promise to add “object access”-like semantics to the
  web
   – Operation centric
   – Uses a large message format
• Extensible
   – Over the years a large amount of extending standards
     were created (AKA WS-*)
   – By extension, adds stateful semantics over the web
• Promotes the use of the proxy pattern
• Not web natural
• Supported by major development environments
SOAP Service calls

• Request




• Response
HTTP
• Promise to transfer hypertext
• The primal and most native protocol of the
  web
• Stateless
• Supported by almost any device on the face of
  the earth
HTTP Service calls
• Request



• Response
SOA
• SOA is an architectural approach for
  distributed systems
• SOA defines four tenets focusing on service
  autonomy and boundaries
• SOA is a fully mature architecture with well-
  known patterns and solutions for complex
  communication and integration scenarios
REST
• The term Representational State Transfer
  (REST) was coined by Roy Fielding in his Ph.D.
  thesis in 2000
• An architectural style that embraces HTTP and
  the World Wide Web
• Web friendly
Richardson maturity model
• Leonard Richardson’s maturity model
  describes four levels of service maturity


                       Hypermedia

                          Http

                        Resources
RMM – Level zero services
• Level zero services do not use HTTP as an application
  protocol.
• Use HTTP as a transport for other remote interaction
  mechanism




                                               Hypermedia

                                                  Http

                                                Resources
RMM – Level one services
• Level one services acknowledge resources
• Resources are accessed via a unique address (formatted as a
  Universal Resource Identifier)
• When accessed, a resource returns a representation

http://myfooty.com/players/henrique
http://myfooty.com/players/neymar




                                                      Hypermedia

                                                         Http

                                                      Resources
Level one service
Web neutrality
• In his famous 2001 bath-tub talk Don Box
  drew the line between web pages and web
  services by defining their consuming life
  forms:




      Carbon based            Silicon based
         Web Pages              Web Services
RMM – Level two services
• Level two services use HTTP mechanisms
  properly:
  – Verbs
  – Status codes
  – Headers



                                      Hypermedia

                                           Http

                                       Resources
HTTP verbs
• HTTP defines different methods (sometimes
  called verbs) to indicate a desired action to be
  performed on a resource
• These verbs define a common terminology
  that is accepted by users, developers and the
  infrastructure of the World Wide Web
Using HTTP verbs for CRUD
HTTP status codes
• In addition to a response message, HTTP uses
  status codes to communicate to the clients the
  resultant status of the operation
• The first digit of the status code specifies one of
  five classes of response:
   –   1xx Informational
   –   2xx Success
   –   3xx Redirection
   –   4xx Client Error
   –   5xx Server Error
HTTP headers
• HTTP uses headers to transfer metadata
  regarding the message’s content and transport
• HTTP headers are one of HTTP’s main
  extensibility points
Level Two Service
RMM – Level three services
• Level one and two services deal with
  resources which represent entities
• Level three services introduce flow
  management via hypermedia controls (For
  example: links)


                                      Hypermedia

                                         Http

                                      Resources
RMM – Level three services
• Hypermedia is used as a logical extension of
  the term hypertext in which graphics, audio,
  video, plain text and hyperlinks intertwine to
  create a generally non-linear medium of
  information.
                 http://en.wikipedia.org/wiki/Hypermedia



                                                           Hypermedia

                                                              Http

                                                           Resources
Hypermedia Application
Hypermedia Patterns

• Hypermedia can be used to express different
  behaviors in an application:
  – Control flow management (State machine)
  – Discoverability and versioning
  – Properties management
  – Aspect management
  – Paging
OData paging
Media types (MIME)

• HTTP media types are used to describe the
  format of the message body
• In REST media types are used describe
  representations, hypermedia controls, and
  processing rules
• By creating a media type we can define the
  application’s domain
Using Media Formatters
Cache the REST
• HTTP caches can store copies of the responses
  along the request response path to reduce
  network traffic
• HTTP caches reduces call latency
• Caches are a main factor for scalability on the
  web
Types of Cache
• Browser Cache
 Stores representations locally on the computer’s hard drive
• Proxy Cache
 Corporates and ISPs provide shared proxies providing shared cache
 on their network
• Gateway (Reverse Proxy) Cache
 Stores representations on behalf of the server. Content Delivery
 Networks (CDNs) use gateway cache distributed around the web
Controlling Cache
• HTTP headers can be used to control cache
  behaviors
• HTTP provides method the avoid staleness of
  cached data
  – Expiration
  – Validation
Controlling Cache Behavior
Summary
• HTTP is a powerful application level protocol
• Built to serve the worlds largest information
  system
• REST provides an architecture that enables
  better use of the inherent scaling capabilities of
  the web
• Hypermedia enables us to scale and grow our
  application
My Blog                                                           ASP.NET Web APIs
http://bit.ly/roadan                                              http://www.asp.net/web-api/
(best viewed from multiple ip addresses)


Architectural Styles and the Design of                            HTTP/1.1 Specifications
                                                                  http://www.w3.org/Protocols/
Network-based Software Architectures
Roy Fielding
http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
                                                                  REST in practice (Book)
                                                                  http://restinpractice.com/default.aspx
Debugging the web with Fiddler
Ido Flatow
http://scc.sela.co.il/SCC/Pages/ShowLecture/ShowLecture.aspx?lectureId=642

Mais conteúdo relacionado

Mais procurados

API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGSiddharth Sharma
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 
Introduction to REST - API
Introduction to REST - APIIntroduction to REST - API
Introduction to REST - APIChetan Gadodia
 
Rest API Automation with REST Assured
Rest API Automation with REST AssuredRest API Automation with REST Assured
Rest API Automation with REST AssuredTO THE NEW Pvt. Ltd.
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 
Introduction to APIs & how to automate APIs testing with selenium web driver?
Introduction to APIs & how to automate APIs testing with selenium web driver?Introduction to APIs & how to automate APIs testing with selenium web driver?
Introduction to APIs & how to automate APIs testing with selenium web driver?BugRaptors
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsQASymphony
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web APIBrad Genereaux
 
API Test Automation
API Test Automation API Test Automation
API Test Automation SQALab
 
Test your microservices with REST-Assured
Test your microservices with REST-AssuredTest your microservices with REST-Assured
Test your microservices with REST-AssuredMichel Schudel
 
Testing RESTful Webservices using the REST-assured framework
Testing RESTful Webservices using the REST-assured frameworkTesting RESTful Webservices using the REST-assured framework
Testing RESTful Webservices using the REST-assured frameworkMicha Kops
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonTEST Huddle
 

Mais procurados (20)

API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNG
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
Rest assured
Rest assuredRest assured
Rest assured
 
Introduction to REST - API
Introduction to REST - APIIntroduction to REST - API
Introduction to REST - API
 
RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
Rest API Automation with REST Assured
Rest API Automation with REST AssuredRest API Automation with REST Assured
Rest API Automation with REST Assured
 
Api Testing
Api TestingApi Testing
Api Testing
 
Rest API
Rest APIRest API
Rest API
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
Introduction to APIs & how to automate APIs testing with selenium web driver?
Introduction to APIs & how to automate APIs testing with selenium web driver?Introduction to APIs & how to automate APIs testing with selenium web driver?
Introduction to APIs & how to automate APIs testing with selenium web driver?
 
API Testing
API TestingAPI Testing
API Testing
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Testing microservices with rest assured
Testing microservices with rest assuredTesting microservices with rest assured
Testing microservices with rest assured
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
API Test Automation
API Test Automation API Test Automation
API Test Automation
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
Test your microservices with REST-Assured
Test your microservices with REST-AssuredTest your microservices with REST-Assured
Test your microservices with REST-Assured
 
Testing RESTful Webservices using the REST-assured framework
Testing RESTful Webservices using the REST-assured frameworkTesting RESTful Webservices using the REST-assured framework
Testing RESTful Webservices using the REST-assured framework
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj Rollison
 

Destaque

Testing RESTful web services with REST Assured
Testing RESTful web services with REST AssuredTesting RESTful web services with REST Assured
Testing RESTful web services with REST AssuredBas Dijkstra
 
2015-StarWest presentation on REST-assured
2015-StarWest presentation on REST-assured2015-StarWest presentation on REST-assured
2015-StarWest presentation on REST-assuredEing Ong
 
Creating a Java EE 7 Websocket Chat Application
Creating a Java EE 7 Websocket Chat ApplicationCreating a Java EE 7 Websocket Chat Application
Creating a Java EE 7 Websocket Chat ApplicationMicha Kops
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API TestingBruno Pedro
 
Time to REST: testing web services
Time to REST: testing web servicesTime to REST: testing web services
Time to REST: testing web servicesIurii Kutelmakh
 
Testing web services
Testing web servicesTesting web services
Testing web servicesTaras Lytvyn
 
Web service testing_final.pptx
Web service testing_final.pptxWeb service testing_final.pptx
Web service testing_final.pptxvodqancr
 
Heleen Kuipers - presentatie reinventing organisations
Heleen Kuipers - presentatie reinventing organisationsHeleen Kuipers - presentatie reinventing organisations
Heleen Kuipers - presentatie reinventing organisationsForzesNL
 
Automation framework
Automation framework Automation framework
Automation framework ITeLearn
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2
 
Continuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQContinuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQTomas Riha
 
Auto-scaled Concourse CI on AWS w/o BOSH
Auto-scaled Concourse CI on AWS w/o BOSHAuto-scaled Concourse CI on AWS w/o BOSH
Auto-scaled Concourse CI on AWS w/o BOSH佑介 九岡
 
Automate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using JavaAutomate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using Javaayman diab
 
Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Herman Peeren
 

Destaque (20)

Testing RESTful web services with REST Assured
Testing RESTful web services with REST AssuredTesting RESTful web services with REST Assured
Testing RESTful web services with REST Assured
 
2015-StarWest presentation on REST-assured
2015-StarWest presentation on REST-assured2015-StarWest presentation on REST-assured
2015-StarWest presentation on REST-assured
 
Creating a Java EE 7 Websocket Chat Application
Creating a Java EE 7 Websocket Chat ApplicationCreating a Java EE 7 Websocket Chat Application
Creating a Java EE 7 Websocket Chat Application
 
Api testing
Api testingApi testing
Api testing
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API Testing
 
Time to REST: testing web services
Time to REST: testing web servicesTime to REST: testing web services
Time to REST: testing web services
 
Testing web services
Testing web servicesTesting web services
Testing web services
 
Web service testing_final.pptx
Web service testing_final.pptxWeb service testing_final.pptx
Web service testing_final.pptx
 
Autoscalable open API testing
Autoscalable open API testingAutoscalable open API testing
Autoscalable open API testing
 
Coherent REST API design
Coherent REST API designCoherent REST API design
Coherent REST API design
 
Heleen Kuipers - presentatie reinventing organisations
Heleen Kuipers - presentatie reinventing organisationsHeleen Kuipers - presentatie reinventing organisations
Heleen Kuipers - presentatie reinventing organisations
 
Automation framework
Automation framework Automation framework
Automation framework
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
 
Continuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQContinuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQ
 
Auto-scaled Concourse CI on AWS w/o BOSH
Auto-scaled Concourse CI on AWS w/o BOSHAuto-scaled Concourse CI on AWS w/o BOSH
Auto-scaled Concourse CI on AWS w/o BOSH
 
Automate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using JavaAutomate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using Java
 
TestNG Framework
TestNG Framework TestNG Framework
TestNG Framework
 
Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.
 
testng
testngtestng
testng
 

Semelhante a Rest assured

What's the origin of REST architectural style?
What's the origin of REST architectural style?What's the origin of REST architectural style?
What's the origin of REST architectural style?Rachel M. Carmena
 
REST and the Hypermedia Constraint
REST and the Hypermedia ConstraintREST and the Hypermedia Constraint
REST and the Hypermedia ConstraintInviqa
 
Web Landscape - updated in Jan 2016
Web Landscape - updated in Jan 2016Web Landscape - updated in Jan 2016
Web Landscape - updated in Jan 2016Jack Zheng
 
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianAPI Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianVahid Rahimian
 
HATEOAS: The Confusing Bit from REST
HATEOAS: The Confusing Bit from RESTHATEOAS: The Confusing Bit from REST
HATEOAS: The Confusing Bit from RESTelliando dias
 
05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebservertarensi
 
Web technologies lesson 1
Web technologies   lesson 1Web technologies   lesson 1
Web technologies lesson 1nhepner
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013Jerome Louvel
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesRestlet
 
www | HTTP | HTML - Tutorial
www | HTTP | HTML - Tutorialwww | HTTP | HTML - Tutorial
www | HTTP | HTML - TutorialMSA Technosoft
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构Benjamin Tan
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIWSO2
 
1. web technology basics
1. web technology basics1. web technology basics
1. web technology basicsJyoti Yadav
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using PhpSudheer Satyanarayana
 

Semelhante a Rest assured (20)

What's the origin of REST architectural style?
What's the origin of REST architectural style?What's the origin of REST architectural style?
What's the origin of REST architectural style?
 
REST and the Hypermedia Constraint
REST and the Hypermedia ConstraintREST and the Hypermedia Constraint
REST and the Hypermedia Constraint
 
Web Landscape - updated in Jan 2016
Web Landscape - updated in Jan 2016Web Landscape - updated in Jan 2016
Web Landscape - updated in Jan 2016
 
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianAPI Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
 
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
 
HATEOAS: The Confusing Bit from REST
HATEOAS: The Confusing Bit from RESTHATEOAS: The Confusing Bit from REST
HATEOAS: The Confusing Bit from REST
 
05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver
 
Web technologies lesson 1
Web technologies   lesson 1Web technologies   lesson 1
Web technologies lesson 1
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web Sites
 
www | HTTP | HTML - Tutorial
www | HTTP | HTML - Tutorialwww | HTTP | HTML - Tutorial
www | HTTP | HTML - Tutorial
 
Web
WebWeb
Web
 
WP Chap 1 & 2.pptx
WP Chap 1 & 2.pptxWP Chap 1 & 2.pptx
WP Chap 1 & 2.pptx
 
REST != WebAPI
REST != WebAPIREST != WebAPI
REST != WebAPI
 
Html
HtmlHtml
Html
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EI
 
Web Topics
Web TopicsWeb Topics
Web Topics
 
1. web technology basics
1. web technology basics1. web technology basics
1. web technology basics
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using Php
 

Último

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 

Último (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

Rest assured

  • 1. REST Assured Yaniv Rodenski Senior Consultant, Sela Group http://blogs.microsoft.co.il/blogs/roadan Twitter: @YRodenski
  • 2. A brief history of The Web API March 2012 ASP.NET is Open Source 6 Preview Versions Fab 2012 ASP.NET Web API (Beta) October 2010 WCF Web API on Code Plex
  • 3.
  • 4. State of the web • Today the web faces new challenges: – Internet scale applications – Cloud operating systems
  • 5. State of the web • Today the web faces new challenges: – Even more complex integrations
  • 6. State of the web • Today the web faces new challenges: – Broader reach of clients
  • 7. Agenda • Basic terminology • REST via the ASP.NET Web API – Richardson maturity model – Hypermedia Patterns – Media types • Caching
  • 8. SOAP • Promise to add “object access”-like semantics to the web – Operation centric – Uses a large message format • Extensible – Over the years a large amount of extending standards were created (AKA WS-*) – By extension, adds stateful semantics over the web • Promotes the use of the proxy pattern • Not web natural • Supported by major development environments
  • 9. SOAP Service calls • Request • Response
  • 10. HTTP • Promise to transfer hypertext • The primal and most native protocol of the web • Stateless • Supported by almost any device on the face of the earth
  • 11. HTTP Service calls • Request • Response
  • 12. SOA • SOA is an architectural approach for distributed systems • SOA defines four tenets focusing on service autonomy and boundaries • SOA is a fully mature architecture with well- known patterns and solutions for complex communication and integration scenarios
  • 13. REST • The term Representational State Transfer (REST) was coined by Roy Fielding in his Ph.D. thesis in 2000 • An architectural style that embraces HTTP and the World Wide Web • Web friendly
  • 14. Richardson maturity model • Leonard Richardson’s maturity model describes four levels of service maturity Hypermedia Http Resources
  • 15. RMM – Level zero services • Level zero services do not use HTTP as an application protocol. • Use HTTP as a transport for other remote interaction mechanism Hypermedia Http Resources
  • 16. RMM – Level one services • Level one services acknowledge resources • Resources are accessed via a unique address (formatted as a Universal Resource Identifier) • When accessed, a resource returns a representation http://myfooty.com/players/henrique http://myfooty.com/players/neymar Hypermedia Http Resources
  • 18. Web neutrality • In his famous 2001 bath-tub talk Don Box drew the line between web pages and web services by defining their consuming life forms: Carbon based Silicon based Web Pages Web Services
  • 19. RMM – Level two services • Level two services use HTTP mechanisms properly: – Verbs – Status codes – Headers Hypermedia Http Resources
  • 20. HTTP verbs • HTTP defines different methods (sometimes called verbs) to indicate a desired action to be performed on a resource • These verbs define a common terminology that is accepted by users, developers and the infrastructure of the World Wide Web
  • 21. Using HTTP verbs for CRUD
  • 22. HTTP status codes • In addition to a response message, HTTP uses status codes to communicate to the clients the resultant status of the operation • The first digit of the status code specifies one of five classes of response: – 1xx Informational – 2xx Success – 3xx Redirection – 4xx Client Error – 5xx Server Error
  • 23. HTTP headers • HTTP uses headers to transfer metadata regarding the message’s content and transport • HTTP headers are one of HTTP’s main extensibility points
  • 25. RMM – Level three services • Level one and two services deal with resources which represent entities • Level three services introduce flow management via hypermedia controls (For example: links) Hypermedia Http Resources
  • 26. RMM – Level three services • Hypermedia is used as a logical extension of the term hypertext in which graphics, audio, video, plain text and hyperlinks intertwine to create a generally non-linear medium of information. http://en.wikipedia.org/wiki/Hypermedia Hypermedia Http Resources
  • 28. Hypermedia Patterns • Hypermedia can be used to express different behaviors in an application: – Control flow management (State machine) – Discoverability and versioning – Properties management – Aspect management – Paging
  • 30. Media types (MIME) • HTTP media types are used to describe the format of the message body • In REST media types are used describe representations, hypermedia controls, and processing rules • By creating a media type we can define the application’s domain
  • 32. Cache the REST • HTTP caches can store copies of the responses along the request response path to reduce network traffic • HTTP caches reduces call latency • Caches are a main factor for scalability on the web
  • 33. Types of Cache • Browser Cache Stores representations locally on the computer’s hard drive • Proxy Cache Corporates and ISPs provide shared proxies providing shared cache on their network • Gateway (Reverse Proxy) Cache Stores representations on behalf of the server. Content Delivery Networks (CDNs) use gateway cache distributed around the web
  • 34. Controlling Cache • HTTP headers can be used to control cache behaviors • HTTP provides method the avoid staleness of cached data – Expiration – Validation
  • 36. Summary • HTTP is a powerful application level protocol • Built to serve the worlds largest information system • REST provides an architecture that enables better use of the inherent scaling capabilities of the web • Hypermedia enables us to scale and grow our application
  • 37.
  • 38. My Blog ASP.NET Web APIs http://bit.ly/roadan http://www.asp.net/web-api/ (best viewed from multiple ip addresses) Architectural Styles and the Design of HTTP/1.1 Specifications http://www.w3.org/Protocols/ Network-based Software Architectures Roy Fielding http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm REST in practice (Book) http://restinpractice.com/default.aspx Debugging the web with Fiddler Ido Flatow http://scc.sela.co.il/SCC/Pages/ShowLecture/ShowLecture.aspx?lectureId=642

Notas do Editor

  1. Focuses on improving web communication by using mechanizes like caching, ETags, the TRACE verb etc.
  2. Focuses on improving web communication by using mechanizes like caching, ETags, the TRACE verb etc.
  3. This model allows a resource to manage its own state while the client manages the application stateRepresentations can also be cached
  4. The “web” uses resources and their representations for caching and scalability.Resources prevent the need to dibranchiate web pages and services
  5. This model allows a resource to manage its own state while the client manages the application state
  6. This model allows a resource to manage its own state while the client manages the application state