SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Web Services




       Web Service API : 80

         (Legacy) System
Web Services




       Web Service API : 80

         (Legacy) System
The Types of Web Services
Big Web Services
  WS-Notification
                   REST
  WS-Security
                   RPC style
  WSDL
                   REST-RPC hybrid
  SOAP
REST
RESTful Web Services
Representational State Transfer (REST) is a
    style of software architecture for
distributed hypermedia systems such as the
World Wide Web. The term Representational
    State Transfer was introduced and
    defined in 2000 by Roy Fielding in his
 doctoral dissertation. Fielding is one of
  the principal authors of the Hypertext
  Transfer Protocol (HTTP) specification
              versions 1.0 and 1.1.
Bookings

Application   HTTP    Routes

                     Passengers
Resources


                      Bookings

Application   HTTP    Routes

                     Passengers
Resources


                POST    /booking/{id}/
                 GET
Application              /route/{id}/
                 PUT
              DELETE   /passenger/{id}/
Addressable
                        Resources


                POST    /booking/{id}/
                 GET
Application              /route/{id}/
                 PUT
              DELETE   /passenger/{id}/
Uniform    Addressable
              Interface    Resources


                 POST      /booking/{id}/
                  GET
Application                 /route/{id}/
                  PUT
               DELETE     /passenger/{id}/
Addressable
                                   Resources

              GET /booking/123/
                                   /booking/{id}/

Application                         /route/{id}/

                                  /passenger/{id}/
Addressable
                                    Resources

              GET /booking/123/
                                   /booking/{id}/

Application                         /route/{id}/

                                  /passenger/{id}/

                                    State and
                                  Representation
Addressable
                                             Resources

                       GET /booking/123/
                                            /booking/{id}/

Application                                  /route/{id}/
                            200 OK
                                           /passenger/{id}/
  id: 123,
  pickupTime: ‘2010-12-13T09:00:00’,
  passenger: {                               State and
     link: {
        href: ‘/passenger/234’,            Representation
        rel: ‘related’
     }
  }
REST = HTTP Used Right

REST was “developed” in parallel with the HTTP/1.1
protocol
Caching and conditional GET
Proxies
HTTP headers (e.g.content negotiation)
HTTP methods
Everything Is a Resource




    There shall be nothing else
Everything Is a Resource



         ROA
    There shall be nothing else
Everything Is a Resource
•Version 1.0.3 of the software release
•The latest version of the software release
•Search results for the word ‘Galactica’
•The next prime number after 1024
•The relationship between Alice and Bob
•A list of open bugs in the bug database

        There shall be nothing else
Clean and Descriptive URIs
Clean and Descriptive URIs
/software/releases/1.0.3.tar.gz
/software/releases/latest.tar.gz
/search/Galactica
/nextprime/1024
/relationships/Alice;Bob
/bugs/by-state/open
State(lessness)


Application vs. Resource
The Uniform Interface
The Uniform Interface

       GET - safe, idempotent
       PUT - idempotent
       DELETE - idempotent
       POST - “complex”
The Uniform Interface

      200 - OK
      201 - Created
      301 - Moved Permanently
      400 - Bad Request
      404 - Not Found
      409 - Conflict
      500 - Internal Server Error
Connectedness


                    passenger



          booking



  route
Hypermedia as the Engine
of Application State

                     passenger



           booking



  route
Problems?
Transactions
Asynchronous tasks
Batch jobs
Relationships between
resources
Partial updates
Partial representations
REST                     WS*
Embraces HTTP            Ignores HTTP
No bandwidth overhead    Good tool support
Simplicity               WSDL
Web already is RESTful   “Standards”
HTTPS / HTTP Diges,      Plethora of Security
OAuth                    Standards
Why?
REST overview
REST overview

Weitere ähnliche Inhalte

Ähnlich wie REST overview

Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsCarol McDonald
 
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETClean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETMarcin Tyborowski
 
rest-api-basics.pptx
rest-api-basics.pptxrest-api-basics.pptx
rest-api-basics.pptxFikiRieza2
 
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...apidays
 
Secure Mashups
Secure MashupsSecure Mashups
Secure Mashupskriszyp
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleEmiliano Pecis
 
Network Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyNetwork Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyPayal Jain
 
Services in Drupal 8
Services in Drupal 8Services in Drupal 8
Services in Drupal 8Andrei Jechiu
 

Ähnlich wie REST overview (12)

Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.js
 
How RESTful Is Your REST?
How RESTful Is Your REST?How RESTful Is Your REST?
How RESTful Is Your REST?
 
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETClean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NET
 
rest-api-basics.pptx
rest-api-basics.pptxrest-api-basics.pptx
rest-api-basics.pptx
 
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Secure Mashups
Secure MashupsSecure Mashups
Secure Mashups
 
TripThru_API_Doc_v1
TripThru_API_Doc_v1TripThru_API_Doc_v1
TripThru_API_Doc_v1
 
Services Stanford 2012
Services Stanford 2012Services Stanford 2012
Services Stanford 2012
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with Oracle
 
Network Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyNetwork Device Database Management with REST using Jersey
Network Device Database Management with REST using Jersey
 
Services in Drupal 8
Services in Drupal 8Services in Drupal 8
Services in Drupal 8
 

Kürzlich hochgeladen

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesSanjay Willie
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsZilliz
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 

Kürzlich hochgeladen (20)

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 

REST overview

  • 1.
  • 2. Web Services Web Service API : 80 (Legacy) System
  • 3. Web Services Web Service API : 80 (Legacy) System
  • 4. The Types of Web Services Big Web Services WS-Notification REST WS-Security RPC style WSDL REST-RPC hybrid SOAP REST
  • 6. Representational State Transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. The term Representational State Transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation. Fielding is one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification versions 1.0 and 1.1.
  • 7. Bookings Application HTTP Routes Passengers
  • 8. Resources Bookings Application HTTP Routes Passengers
  • 9. Resources POST /booking/{id}/ GET Application /route/{id}/ PUT DELETE /passenger/{id}/
  • 10. Addressable Resources POST /booking/{id}/ GET Application /route/{id}/ PUT DELETE /passenger/{id}/
  • 11. Uniform Addressable Interface Resources POST /booking/{id}/ GET Application /route/{id}/ PUT DELETE /passenger/{id}/
  • 12. Addressable Resources GET /booking/123/ /booking/{id}/ Application /route/{id}/ /passenger/{id}/
  • 13. Addressable Resources GET /booking/123/ /booking/{id}/ Application /route/{id}/ /passenger/{id}/ State and Representation
  • 14. Addressable Resources GET /booking/123/ /booking/{id}/ Application /route/{id}/ 200 OK /passenger/{id}/ id: 123, pickupTime: ‘2010-12-13T09:00:00’, passenger: { State and link: { href: ‘/passenger/234’, Representation rel: ‘related’ } }
  • 15. REST = HTTP Used Right REST was “developed” in parallel with the HTTP/1.1 protocol Caching and conditional GET Proxies HTTP headers (e.g.content negotiation) HTTP methods
  • 16. Everything Is a Resource There shall be nothing else
  • 17. Everything Is a Resource ROA There shall be nothing else
  • 18. Everything Is a Resource •Version 1.0.3 of the software release •The latest version of the software release •Search results for the word ‘Galactica’ •The next prime number after 1024 •The relationship between Alice and Bob •A list of open bugs in the bug database There shall be nothing else
  • 20. Clean and Descriptive URIs /software/releases/1.0.3.tar.gz /software/releases/latest.tar.gz /search/Galactica /nextprime/1024 /relationships/Alice;Bob /bugs/by-state/open
  • 23. The Uniform Interface GET - safe, idempotent PUT - idempotent DELETE - idempotent POST - “complex”
  • 24. The Uniform Interface 200 - OK 201 - Created 301 - Moved Permanently 400 - Bad Request 404 - Not Found 409 - Conflict 500 - Internal Server Error
  • 25. Connectedness passenger booking route
  • 26. Hypermedia as the Engine of Application State passenger booking route
  • 27. Problems? Transactions Asynchronous tasks Batch jobs Relationships between resources Partial updates Partial representations
  • 28. REST WS* Embraces HTTP Ignores HTTP No bandwidth overhead Good tool support Simplicity WSDL Web already is RESTful “Standards” HTTPS / HTTP Diges, Plethora of Security OAuth Standards
  • 29. Why?