SlideShare a Scribd company logo
WEB SERVICES CRASH COURSE
Presented by: Noah Lively, Founder of KoreMedia Productions
DRUPAL 7
PURPOSE OF THIS CLASS:
Demonstrate how to use Drupal 7 as a
web service endpoint.
Why?
So you can connect apps and other websites to your Drupal
site.
ANALOGY:
Let Drupal be the “brain”
Let your apps be the “face”
WHY DRUPAL WEB SERVICES:
Because web services are cool
Because a website is much more versatile when it can connect
with other sites
(continued)
WHY DRUPAL WEB SERVICES:
Because Drupal provides an excellent hybrid solution between
powerful CMS and web service platform
 Leverage an enterprise-class CMS
 Provide a web-based back-end management interface
via core platform
 Provide a web-based front-end user interface
via core platform
 Provide a mobile app or HTML5 app interface
via web services
EXAMPLE APP: PIZZA SHOP
Back-end:
 A Drupal site acts as the application server and content management platform.
 Manager can manage the menu through the Drupal site.
 Drupal site receives orders and notifies the manager.
EXAMPLE APP: PIZZA SHOP
Front-end:
 An AngularJS app connects to Drupal and displays pizzas in a responsive web
page.
 Customers can order pizzas from the app, which triggers a server-side email to
the manager (via web services)
 Customers can make menu suggestions by configuring their own pizza topping
combinations. These suggestions get added as “unpublished” nodes to the Drupal
site via web services.
MODULES:
Common modules to use and be aware of:
 Services – Core platform that exposes existing data types to Drupal
 Oauth or OAuth2
 CORS – cross-origin resource sharing. Provides necessary web server headers to
allow front-end apps to access the data
 Services Views
DRUPAL SETUP:
 Install services module
 Configure a web service endpoint
 Select which web service methods to enable for that endpoint
 Configure authentication (session, oauth or none)
 Install services_views module to use views as web service endpoints
 Write your own service endpoints by implementing hook_services_resources() in
your module
TESTING IT OUT:
 Install the Postman extension on Google chrome
 Set up an HTTP request in Postman pointing to your web service method:
 (SITE URL) + (ENDPOINT PATH) + (METHOD NAME).json
 For example usage, download the Postman collection referenced at the end of this
presentation and install it into your local Postman app
EXAMPLE CODE:
Example site (includes database dump):
https://github.com/nlively/pizza_shop
Example app:
https://github.com/nlively/pizza_shop_app
Postman collection:
https://www.getpostman.com/collections/26f40e0428bd1ba8c10
9
CONTACT ME:
Email: noah@koremedia.net
Twitter: noahlively
Skype: noahlively
Drupal.org: noahlively
ABOUT ME:
Noah Lively
 Been involved in Drupal development since 2008.
 Founder and CEO of KoreMedia Productions,
a full-service Rocklin-based Drupal firm
 Co-creator of WindowAgent, a Drupal-backed product that takes real estate
listings from the MLS and exposes them via
a touch screen interface
ABOUT KOREMEDIA:
We are a growing team of Drupal devs. Our key strengths are
in connecting Drupal to other platforms and upgrading Drupal
sites (major versions), and optimizing Drupal for the
enterprise.

More Related Content

PPTX
Sharing Resources - Mule
ODP
PPTX
PPT - A slice of cake php
PPTX
Mulesoft Calling Flow of Other Applications
PDF
Exposing Web Service (CXF) With Mule ESB
PPTX
Brug - Web push notification
PPTX
How to Install and Configure Drupal CMS
PPTX
How to Install and Configure Drupal CMS
Sharing Resources - Mule
PPT - A slice of cake php
Mulesoft Calling Flow of Other Applications
Exposing Web Service (CXF) With Mule ESB
Brug - Web push notification
How to Install and Configure Drupal CMS
How to Install and Configure Drupal CMS

What's hot (19)

PPT
Laravel & Composer presentation - WebHostFace
PPTX
Create web services jax - ws3
PPTX
Deploy mule application
PDF
Introducing Mule Application and API
PPTX
Integration with CMIS using Mule ESB
PPTX
Create web services jax - ws2
PPTX
Mule Integration with Dropbox
PPTX
Mule with drools
PPTX
Using maven with mule
PPTX
Logging best practice in mule using logger component
PPTX
Mule
PPTX
Mule integration-application
PDF
CloudHub Connector With Mulesoft
PPTX
Mule with salesforce push topic notification copy
PPT
Introduction to Cakephp
PPTX
Automatic documentation with mule
 
PPTX
Cloudhub fabric
PPTX
ASP.NET - Directives
PDF
Building Restful Web App Rapidly in CakePHP
Laravel & Composer presentation - WebHostFace
Create web services jax - ws3
Deploy mule application
Introducing Mule Application and API
Integration with CMIS using Mule ESB
Create web services jax - ws2
Mule Integration with Dropbox
Mule with drools
Using maven with mule
Logging best practice in mule using logger component
Mule
Mule integration-application
CloudHub Connector With Mulesoft
Mule with salesforce push topic notification copy
Introduction to Cakephp
Automatic documentation with mule
 
Cloudhub fabric
ASP.NET - Directives
Building Restful Web App Rapidly in CakePHP
Ad

Viewers also liked (14)

PDF
PDF
PDF
Web coding principle
PDF
PDF
PDF
提高 Code 品質心得
PDF
PPT
PPT
Architecture of the oasis mobile shared virtual memory system
PPT
Libckpt transparent checkpointing under unix
PPT
Consistency protocols
PPT
Device Driver - Chapter 6字元驅動程式的進階作業
PPT
OpenMP
PPT
Device Driver - Chapter 3字元驅動程式
Web coding principle
提高 Code 品質心得
Architecture of the oasis mobile shared virtual memory system
Libckpt transparent checkpointing under unix
Consistency protocols
Device Driver - Chapter 6字元驅動程式的進階作業
OpenMP
Device Driver - Chapter 3字元驅動程式
Ad

Similar to Drupal 7 Web Services Crash Course (20)

PDF
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
PDF
Drupal South 2015: Introduction to Web Services. Services in Drupal 8.
PPTX
Decoupling Drupal 8.x: Drupal’s Web Services Today and Tomorrow
PPTX
RESTful application with Drupal 8
PPT
Drupal As A RESTful Backend For Client Side Applications
PDF
Services in Drupal 8
PDF
With Drupal Your Website is an API
PDF
Services Drupalcamp Stockholm 2009
PDF
Drupal 8 as a mobile backend
PDF
RESTful with Drupal - in-s and out-s
PDF
Talking to Web Services
PPTX
RestFul Web Services In Drupal 8
PPTX
Drupal 8 Deep Dive: What It Means for Developers Now that REST Is in Core
PDF
Serving the Internet of Things (IoT) with Drupal - DrupalCon Barcelona 2015
PPTX
REST in Peace
PDF
RESTful Web Services in Drupal7
PPTX
Restful webservices
PPTX
Built for Integration: Why Drupal 8 Should Be the Glue to Your Stack
ODP
Services Stanford 2012
PDF
Build a Restfull app using drupal
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
Drupal South 2015: Introduction to Web Services. Services in Drupal 8.
Decoupling Drupal 8.x: Drupal’s Web Services Today and Tomorrow
RESTful application with Drupal 8
Drupal As A RESTful Backend For Client Side Applications
Services in Drupal 8
With Drupal Your Website is an API
Services Drupalcamp Stockholm 2009
Drupal 8 as a mobile backend
RESTful with Drupal - in-s and out-s
Talking to Web Services
RestFul Web Services In Drupal 8
Drupal 8 Deep Dive: What It Means for Developers Now that REST Is in Core
Serving the Internet of Things (IoT) with Drupal - DrupalCon Barcelona 2015
REST in Peace
RESTful Web Services in Drupal7
Restful webservices
Built for Integration: Why Drupal 8 Should Be the Glue to Your Stack
Services Stanford 2012
Build a Restfull app using drupal

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation theory and applications.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
“AI and Expert System Decision Support & Business Intelligence Systems”
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Understanding_Digital_Forensics_Presentation.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
MYSQL Presentation for SQL database connectivity
20250228 LYD VKU AI Blended-Learning.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation theory and applications.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

Drupal 7 Web Services Crash Course

  • 1. WEB SERVICES CRASH COURSE Presented by: Noah Lively, Founder of KoreMedia Productions DRUPAL 7
  • 2. PURPOSE OF THIS CLASS: Demonstrate how to use Drupal 7 as a web service endpoint. Why? So you can connect apps and other websites to your Drupal site.
  • 3. ANALOGY: Let Drupal be the “brain” Let your apps be the “face”
  • 4. WHY DRUPAL WEB SERVICES: Because web services are cool Because a website is much more versatile when it can connect with other sites (continued)
  • 5. WHY DRUPAL WEB SERVICES: Because Drupal provides an excellent hybrid solution between powerful CMS and web service platform  Leverage an enterprise-class CMS  Provide a web-based back-end management interface via core platform  Provide a web-based front-end user interface via core platform  Provide a mobile app or HTML5 app interface via web services
  • 6. EXAMPLE APP: PIZZA SHOP Back-end:  A Drupal site acts as the application server and content management platform.  Manager can manage the menu through the Drupal site.  Drupal site receives orders and notifies the manager.
  • 7. EXAMPLE APP: PIZZA SHOP Front-end:  An AngularJS app connects to Drupal and displays pizzas in a responsive web page.  Customers can order pizzas from the app, which triggers a server-side email to the manager (via web services)  Customers can make menu suggestions by configuring their own pizza topping combinations. These suggestions get added as “unpublished” nodes to the Drupal site via web services.
  • 8. MODULES: Common modules to use and be aware of:  Services – Core platform that exposes existing data types to Drupal  Oauth or OAuth2  CORS – cross-origin resource sharing. Provides necessary web server headers to allow front-end apps to access the data  Services Views
  • 9. DRUPAL SETUP:  Install services module  Configure a web service endpoint  Select which web service methods to enable for that endpoint  Configure authentication (session, oauth or none)  Install services_views module to use views as web service endpoints  Write your own service endpoints by implementing hook_services_resources() in your module
  • 10. TESTING IT OUT:  Install the Postman extension on Google chrome  Set up an HTTP request in Postman pointing to your web service method:  (SITE URL) + (ENDPOINT PATH) + (METHOD NAME).json  For example usage, download the Postman collection referenced at the end of this presentation and install it into your local Postman app
  • 11. EXAMPLE CODE: Example site (includes database dump): https://github.com/nlively/pizza_shop Example app: https://github.com/nlively/pizza_shop_app Postman collection: https://www.getpostman.com/collections/26f40e0428bd1ba8c10 9
  • 12. CONTACT ME: Email: noah@koremedia.net Twitter: noahlively Skype: noahlively Drupal.org: noahlively
  • 13. ABOUT ME: Noah Lively  Been involved in Drupal development since 2008.  Founder and CEO of KoreMedia Productions, a full-service Rocklin-based Drupal firm  Co-creator of WindowAgent, a Drupal-backed product that takes real estate listings from the MLS and exposes them via a touch screen interface
  • 14. ABOUT KOREMEDIA: We are a growing team of Drupal devs. Our key strengths are in connecting Drupal to other platforms and upgrading Drupal sites (major versions), and optimizing Drupal for the enterprise.