SlideShare a Scribd company logo
1 of 7
RESTFul API – Introduction

    WHAT IS REST?

     REST(REpresentational State Transfer) is a simple way to organize interactions between
    independent systems.

    A RESTful web service (also called a RESTful web API) is a web service implemented using
    HTTP and the principles of REST. It is a collection of resources, with four defined aspects:
     
         The base URI for the web service, such as http://example.com/resources/
     
         The Internet media type of the data supported by the web service. This is often XML but can be any
         other valid Internet media type provided that it is a valid hypertext standard like JSON.
     
         The set of operations supported by the web service using HTTP methods (e.g., GET, PUT, POST,
         DELETE).
     
         The API must be hypertext driven.

    REST is not a standard, its a design pattern, you can't bottle      REST vs SOAP: simplicity
    up a pattern, you can only understand it and design your Web        wins again

    services to it.

    All the major webservices on the Internet now use REST. REST is
    used by Giant enterprises like Ebay, Amazon, Twitter, Yahoo. It's
    also used by other popular products like Flickr, del.icio.us,
    pubsub, bloglines, technorati.

    REST is similar to SOAP but with following differences:
    
        SOAP uses WSDL for communication btw consumer and
        provider, whereas REST just uses XML or JSON to send and
        receive data.
    
        SOAP doesn't return human readable result, while REST result
        is readable which is just plain XML or JSON.
Restful API Example:                                                Updating Information using HTTP POST
    Retrieving Information using HTTP GET                     Book: DaVince Code
                                                              Credit Card: Visa
                                                              Number: 123-45-6789   POST / /HTTP/1.1
                                                              Expiry: 12-04-06       POST HTTP/1.1
                                                                                    Host: http://www.amazon.com
                  GET //HTTP/1.1
                  GET HTTP/1.1                                                       Host: http://www.amazon.com
http://www.amaz
     on.com       Host: http://www.amazon.com
                  Host: http://www.amazon.com                                                                       Amazon
                                                                                                                   Web Server
                                             Amazon                                  Book: Da Vince Code
                                                                                      Book: Da Vince Code
                                            Web Server                               Credit Card: Visa
                                                                                      Credit Card: Visa
                                                                                     Number: 123-45-6789
                                                                                      Number: 123-45-6789
                                                                                     Expiry: 12-04-06
                                                                                      Expiry: 12-04-06


    User send a request to http://www.amazon.com

    The browser software creates an HTTP header          
                                                           The user fills in the Web page's form

    The HTTP header identifies:                          
                                                           The browser software creates an HTTP header
                                                         with form data
    The desired action: GET ("get me resource")          
                                                           The HTTP header identifies:
    The target machine (www.amazon.com)                  The desired action: POST
                                                         The target machine (amazon API call)
                                                         The payload contains: the form data
The REST way Designing the Web Services
RESTful API – Key Highlights

     Rich web client can talk directly with Application.

     Useful when you have integrate multiple different clients

     RESTful way takes less effort.

     Works Out of the Box no setup,just a design model.

     Standard API - Creating an API on standards that already exist makes it much easier for application
    developers to use your API.
Who is using REST?

    Google
    GData,OpenSocial

    Standards
    Atom,WebDAV

    Amazon
    S3,SimpleDB

    Buddy.com
Who is using REST?

    Google
    GData,OpenSocial

    Standards
    Atom,WebDAV

    Amazon
    S3,SimpleDB

    Buddy.com

More Related Content

What's hot

Intro the WordPress REST API by tomhermans
Intro the WordPress REST API by tomhermansIntro the WordPress REST API by tomhermans
Intro the WordPress REST API by tomhermansTom Hermans
 
Prabhanjan Panigrahi
Prabhanjan PanigrahiPrabhanjan Panigrahi
Prabhanjan PanigrahiAnirban Saha
 
Beyond The Browser - Creating a RESTful Web Service With WordPress
Beyond The Browser - Creating a RESTful Web Service With WordPressBeyond The Browser - Creating a RESTful Web Service With WordPress
Beyond The Browser - Creating a RESTful Web Service With WordPressChristopher Reding
 
How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013Search Commander, Inc.
 
1-01: Introduction To Web Development
1-01: Introduction To  Web  Development1-01: Introduction To  Web  Development
1-01: Introduction To Web Developmentapnwebdev
 
Costruire applicazioni multi-tenant e piattaforme SaaS in PHP con Innomatic
Costruire applicazioni multi-tenant e piattaforme SaaS in PHP con InnomaticCostruire applicazioni multi-tenant e piattaforme SaaS in PHP con Innomatic
Costruire applicazioni multi-tenant e piattaforme SaaS in PHP con InnomaticInnoteam Srl
 
Cache Rules Everything Around Me
Cache Rules Everything Around MeCache Rules Everything Around Me
Cache Rules Everything Around MeRussell Heimlich
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web developmentAlberto Apellidos
 
Basic Introduction to Web Development
Basic Introduction to Web DevelopmentBasic Introduction to Web Development
Basic Introduction to Web DevelopmentBurhan Khalid
 
Make your website load really really fast - seo campus 2017
Make your website load really really fast  - seo campus 2017Make your website load really really fast  - seo campus 2017
Make your website load really really fast - seo campus 2017SEO Camp Association
 
Introduction to WordPress Class 1
Introduction to WordPress Class 1Introduction to WordPress Class 1
Introduction to WordPress Class 1Adrian Mikeliunas
 
Headway Design Two 0
Headway Design Two 0Headway Design Two 0
Headway Design Two 0crackmaker00
 
Content Architecture in WordPress
Content Architecture in WordPressContent Architecture in WordPress
Content Architecture in WordPressJamie Schmid
 
Building a Professional Website for Your Business
Building a Professional Website for Your BusinessBuilding a Professional Website for Your Business
Building a Professional Website for Your BusinessDennis Hong
 
Wordpress: A Tool for online Earning
Wordpress: A Tool for online EarningWordpress: A Tool for online Earning
Wordpress: A Tool for online Earningmarpasha
 
WordPress Webinar Training Presentation
WordPress Webinar Training PresentationWordPress Webinar Training Presentation
WordPress Webinar Training PresentationMayeCreate Design
 

What's hot (19)

Intro the WordPress REST API by tomhermans
Intro the WordPress REST API by tomhermansIntro the WordPress REST API by tomhermans
Intro the WordPress REST API by tomhermans
 
Prabhanjan Panigrahi
Prabhanjan PanigrahiPrabhanjan Panigrahi
Prabhanjan Panigrahi
 
Guide Hosting Dictionary
Guide Hosting DictionaryGuide Hosting Dictionary
Guide Hosting Dictionary
 
Beyond The Browser - Creating a RESTful Web Service With WordPress
Beyond The Browser - Creating a RESTful Web Service With WordPressBeyond The Browser - Creating a RESTful Web Service With WordPress
Beyond The Browser - Creating a RESTful Web Service With WordPress
 
How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013
 
1-01: Introduction To Web Development
1-01: Introduction To  Web  Development1-01: Introduction To  Web  Development
1-01: Introduction To Web Development
 
Costruire applicazioni multi-tenant e piattaforme SaaS in PHP con Innomatic
Costruire applicazioni multi-tenant e piattaforme SaaS in PHP con InnomaticCostruire applicazioni multi-tenant e piattaforme SaaS in PHP con Innomatic
Costruire applicazioni multi-tenant e piattaforme SaaS in PHP con Innomatic
 
Cache Rules Everything Around Me
Cache Rules Everything Around MeCache Rules Everything Around Me
Cache Rules Everything Around Me
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
Basic Introduction to Web Development
Basic Introduction to Web DevelopmentBasic Introduction to Web Development
Basic Introduction to Web Development
 
Make your website load really really fast - seo campus 2017
Make your website load really really fast  - seo campus 2017Make your website load really really fast  - seo campus 2017
Make your website load really really fast - seo campus 2017
 
Introduction to WordPress Class 1
Introduction to WordPress Class 1Introduction to WordPress Class 1
Introduction to WordPress Class 1
 
Headway Design Two 0
Headway Design Two 0Headway Design Two 0
Headway Design Two 0
 
Presentation1 renan
Presentation1 renanPresentation1 renan
Presentation1 renan
 
Content Architecture in WordPress
Content Architecture in WordPressContent Architecture in WordPress
Content Architecture in WordPress
 
Building a Professional Website for Your Business
Building a Professional Website for Your BusinessBuilding a Professional Website for Your Business
Building a Professional Website for Your Business
 
Wordpress: A Tool for online Earning
Wordpress: A Tool for online EarningWordpress: A Tool for online Earning
Wordpress: A Tool for online Earning
 
WordPress Webinar Training Presentation
WordPress Webinar Training PresentationWordPress Webinar Training Presentation
WordPress Webinar Training Presentation
 
Wordpress development 101
Wordpress development 101Wordpress development 101
Wordpress development 101
 

Similar to Restful_api

Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web ServicesAngelin R
 
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generatorsDEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generatorsFelipe Prado
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoDEVCON
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideAmazon Web Services
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideAmazon Web Services
 
Case Study: The internals of Amazon.com's architecture that allows it to secu...
Case Study: The internals of Amazon.com's architecture that allows it to secu...Case Study: The internals of Amazon.com's architecture that allows it to secu...
Case Study: The internals of Amazon.com's architecture that allows it to secu...Amazon Web Services
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETSharePointKE
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development PresentationTurnToTech
 
Server and Client side comparision
Server and Client side comparisionServer and Client side comparision
Server and Client side comparisionStew Duncan
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Mario Cardinal
 
20200520 - Como empezar a desarrollar aplicaciones serverless
20200520 - Como empezar a desarrollar aplicaciones serverless 20200520 - Como empezar a desarrollar aplicaciones serverless
20200520 - Como empezar a desarrollar aplicaciones serverless Marcia Villalba
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and youJames Beswick
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web appsFastly
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecuritiesamiable_indian
 
Rest full
Rest fullRest full
Rest fullgfarid
 
Web Apps: APIs' Nightmare
Web Apps: APIs' NightmareWeb Apps: APIs' Nightmare
Web Apps: APIs' NightmarePaulo Silva
 
Progressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting StartedProgressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting StartedGaurav Behere
 

Similar to Restful_api (20)

Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web Services
 
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generatorsDEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent Convento
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a Ride
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a Ride
 
Case Study: The internals of Amazon.com's architecture that allows it to secu...
Case Study: The internals of Amazon.com's architecture that allows it to secu...Case Study: The internals of Amazon.com's architecture that allows it to secu...
Case Study: The internals of Amazon.com's architecture that allows it to secu...
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Server and Client side comparision
Server and Client side comparisionServer and Client side comparision
Server and Client side comparision
 
Webmaster
WebmasterWebmaster
Webmaster
 
Webmaster
WebmasterWebmaster
Webmaster
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
 
20200520 - Como empezar a desarrollar aplicaciones serverless
20200520 - Como empezar a desarrollar aplicaciones serverless 20200520 - Como empezar a desarrollar aplicaciones serverless
20200520 - Como empezar a desarrollar aplicaciones serverless
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and you
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
Rest full
Rest fullRest full
Rest full
 
Web Apps: APIs' Nightmare
Web Apps: APIs' NightmareWeb Apps: APIs' Nightmare
Web Apps: APIs' Nightmare
 
Web servers
Web serversWeb servers
Web servers
 
Progressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting StartedProgressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting Started
 

Restful_api

  • 1. RESTFul API – Introduction WHAT IS REST?  REST(REpresentational State Transfer) is a simple way to organize interactions between independent systems.  A RESTful web service (also called a RESTful web API) is a web service implemented using HTTP and the principles of REST. It is a collection of resources, with four defined aspects:  The base URI for the web service, such as http://example.com/resources/  The Internet media type of the data supported by the web service. This is often XML but can be any other valid Internet media type provided that it is a valid hypertext standard like JSON.  The set of operations supported by the web service using HTTP methods (e.g., GET, PUT, POST, DELETE).  The API must be hypertext driven.
  • 2. REST is not a standard, its a design pattern, you can't bottle REST vs SOAP: simplicity up a pattern, you can only understand it and design your Web wins again services to it.  All the major webservices on the Internet now use REST. REST is used by Giant enterprises like Ebay, Amazon, Twitter, Yahoo. It's also used by other popular products like Flickr, del.icio.us, pubsub, bloglines, technorati.  REST is similar to SOAP but with following differences:  SOAP uses WSDL for communication btw consumer and provider, whereas REST just uses XML or JSON to send and receive data.  SOAP doesn't return human readable result, while REST result is readable which is just plain XML or JSON.
  • 3. Restful API Example: Updating Information using HTTP POST Retrieving Information using HTTP GET Book: DaVince Code Credit Card: Visa Number: 123-45-6789 POST / /HTTP/1.1 Expiry: 12-04-06 POST HTTP/1.1 Host: http://www.amazon.com GET //HTTP/1.1 GET HTTP/1.1 Host: http://www.amazon.com http://www.amaz on.com Host: http://www.amazon.com Host: http://www.amazon.com Amazon Web Server Amazon Book: Da Vince Code Book: Da Vince Code Web Server Credit Card: Visa Credit Card: Visa Number: 123-45-6789 Number: 123-45-6789 Expiry: 12-04-06 Expiry: 12-04-06  User send a request to http://www.amazon.com  The browser software creates an HTTP header  The user fills in the Web page's form  The HTTP header identifies:  The browser software creates an HTTP header with form data The desired action: GET ("get me resource")  The HTTP header identifies: The target machine (www.amazon.com) The desired action: POST The target machine (amazon API call) The payload contains: the form data
  • 4. The REST way Designing the Web Services
  • 5. RESTful API – Key Highlights  Rich web client can talk directly with Application.  Useful when you have integrate multiple different clients  RESTful way takes less effort.  Works Out of the Box no setup,just a design model.  Standard API - Creating an API on standards that already exist makes it much easier for application developers to use your API.
  • 6. Who is using REST?  Google GData,OpenSocial  Standards Atom,WebDAV  Amazon S3,SimpleDB  Buddy.com
  • 7. Who is using REST?  Google GData,OpenSocial  Standards Atom,WebDAV  Amazon S3,SimpleDB  Buddy.com