SlideShare a Scribd company logo
1 of 20
Brian Layman
eHermits Inc, LTD
WordCamp Columbus
August 27, 2016 A Quick Trip Down the Rabbit Hole
• Brian Layman
• I work from home
• I spend all day on the computer
• All best my friends are online
• I don’t hang out at parties
• I spend my day in a cave like room
• Yes, I am an eHermit
http://eHermitsInc.com
INTRODUCTION
http://imgs.xkcd.com/comics/tech_support_cheat_sheet.png
Our
Dark
Secre
t
FUNDAMENTAL CHANGES IN WP
• Plugins – Made WordPress extendable
• The NONCE – WordPress is made safe.
• Tags – Changed how we reached posts
• Plugin & Theme Updates
• Shortcodes
• Automatic core security updates
• Custom Taxonomies
• Custom Post Types
• Theme Customizer
THIS ONE IS DIFFERENT
• WP-REST-API
• All Inclusive
• Externally focused
• Not just for us
• Language independent
• Driven not by community needs but by the direction the web is going
• We can’t tell you what all changes this will bring.
• This is the path to the next 15 years of WordPress
WP-REST-API - WHAT IS IT?
• WordPress is moving towards becoming a fully-fledged application framework, and
we need new APIs. This project was born to create an easy-to-use, easy-to-
understand and well-tested framework for creating these APIs, plus creating APIs for
core.
• This plugin provides an easy to use REST API, available via HTTP. Grab your site’s
data in simple JSON format, including users, posts, taxonomies and more. Retrieving
or updating data is as simple as sending a HTTP request.
• The API exposes a simple yet easy interface to WP Query, the posts API, post meta
API, users API, revisions API and many more. Chances are, if you can do it with
WordPress, WP API will let you do it.
http://v2.wp-api.org/
OK, BUT WHAT IS IT?
• An API is an Application Programmer’s Interface
• An API is a set way to allow other people to use the code that you’ve created.
• REST is Representational State Transfer
• It basically is a “language” used to speak to websites using URLS
• A collection of URLS through which you can explain
• What information you are seeking
• What action you want to take
• What information you already have and are providing to allow the request to be complete
OK BUT WHAT ABOUT THE
WORDPRESS PART OF IT
• Using URLS you can write an app that can do anything you can do in WordPress*
• There might be some lag between when new features get into Word
• The most basic examples
• List all the posts
• https://2016.columbus.wordcamp.org/wp-json/posts
• Get all the details about a post
• https://2016.columbus.wordcamp.org/wp-json/posts/769
• Get all the details about an attachment
• https://2016.columbus.wordcamp.org/wp-json/posts/965
• Get the hashtag for a WordCamp event
• https://2016.columbus.wordcamp.org/wp-json/taxonomies/hashtag/terms
BUT WAIT THERE’S MORE
• The previous page showed Getting information, but you can talk to the API and do
more than ask form information
• You can GET, POST and DELETE
• /wp-json/<object> ~ /wp-json/posts
• Get – Returns a collection
• Post – Adds a new object
• /wp-json/<object>/<id> ~ /wp-json/posts/769
• Get – Returns the specific object
• Post – Updates a specific object
• Delete – Deletes a specific object
WAIT!!! DID YOU JUST SAY DELETE?!?
• Yes, you can delete objects with the API.
• No – the sky isn’t falling.
• The WP-REST-API is safe and the same permissions you have when you are visiting
the website through the browser exist for when you visit the website through
logging in (or not)
• In point of fact you still have to login or identify yourself in one of three ways
• A cookie
• OAuth 1.0a (like connecting JetPack to Twitter)
• Basic Authentication
• Sending a username and password with every request
• Only do this with an https address
OK – HOW ARE WE DOING?
WHAT CAN YOU DO
WITH THE WP-REST-API?
https://backpress.org/
• Anybody remember
BackPress?
• Core of WordPress without
WordPress
• A huge leg up because
authentication and
everything else is already
done.
• With the WP-Rest-API, this
is a freebie
FOR USE IN THEMES
• Several experimental themes already exist
• Picard
• Tango - https://github.com/kwight/tango/
• Many other sites are implementing feature level support
• Quartz
• http://qz.com
• Speeds interface through pre-fetching posts and using the local storage feature
• New York Times
• Live Event coverage
• Many SPA websites are coming
FOR USE ON DEVICES
• Native phone applications
• Object-C or any other modern language can speak REST and JSON
• Responsive themes can be step 1 for this to get your MVP
• Updates from your watch
• Server Monitoring
• Event Tracking
• Jogging routes
• Smart House Integration
• Webcam
DATABASE INTEGRATION
• WordPress & Custom Post Types allow you to do more
• Custom Post Types and the WP-Rest-API take you that much further again
• Video Warehouse – Apple TV powered by WordPress
• Photo Albums
• Ancestry and Family Tree Applications
• Retail Stores
LEGACY/INDUSTRY CONVERSION
• Because almost all coputer languages can speak REST this is a pathway to get the
data from these last millennium platforms into formats newer solutions can use.
• This is the source code needed for an
IBM AS/400 to post to a REST API
• Now WordPress can be the conduit to
track the productions of assembly lines.
• Dominoes Pizza can show your pizza
being assembled. Maybe WordPress
Will be used to show your as your Tesla
comes through the production line.
GETTING CREATIVE
• You aren’t limited to what WordPress does now.
• You can add custom routes & endpoints to do anything you want.
• Form Responses
• Force WordPress actions
• Reblogging
• Dev Environment Clone/Deploy
• Import from flatfile (products or phone numbers)
• Fetching a new content
• You can use other languages to do things that WordPress isn’t good at
• Datamining/Machine Learning
• Image Cleanup
• Specific Cached Data Flushing
WHERE CAN I LEARN MORE?
• The website: http://wp-api.org (Don’t ignore v1. There’s good content there)
• WordPress.TV
• Evan Volgas What it is, Why it matters and What you need to know about it.
http://wordpress.tv/2016/07/26/evan-volgas-wp-rest-api-what-it-is-why-it-matters-what-you-need-to-
know-about-it/
• Jack Lennox’s Building Themes with the Rest API
http://wordpress.tv/2015/12/04/jack-lenox-building-themes-wp-rest-api/
• Jeff Well’s Stretching WordPress
http://wordpress.tv/2016/06/09/jeff-wells-stretching-wordpress-to-the-limits-using-the-wp-rest-api/
• Jack Lennox’s Single Page Application talk
http://wordpress.tv/2016/07/19/jack-lenox-building-single-page-applications-with-the-rest-api/
• Scott Taylor’s WordCamp US talk
http://wordpress.tv/2015/12/10/scott-taylor-rest-in-action-the-live-coverage-platform-at-the-new-york-times/
BRIAN LAYMAN
http://eHermitsinc.com
http://thecodecave.com
http://www.slideshare.net/brianlayman
http://twitter.com/brianlayman
@eHermits
My info->your phone, Txt “ehermit” to 50500
Brian@eHermitsInc.com

More Related Content

What's hot

Migrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoMigrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoWeng Wei
 
Building a Library Website with WordPress
Building a Library Website with WordPressBuilding a Library Website with WordPress
Building a Library Website with WordPressNicole C. Engard
 
Untangling the web week 2 - SEO
Untangling the web week 2 - SEOUntangling the web week 2 - SEO
Untangling the web week 2 - SEODerek Jacoby
 
WordPress for Libraries PreConference Workshop
WordPress for Libraries PreConference WorkshopWordPress for Libraries PreConference Workshop
WordPress for Libraries PreConference WorkshopPolly Farrington
 
Localizing SharePoint: Adding Multi-language Support to Your Site
Localizing SharePoint: Adding Multi-language Support to Your SiteLocalizing SharePoint: Adding Multi-language Support to Your Site
Localizing SharePoint: Adding Multi-language Support to Your SiteGreg Hurlman
 
Wireless ad hoc distribution
Wireless ad hoc distributionWireless ad hoc distribution
Wireless ad hoc distributionCocoaHeads.fr
 
Maine WordPress Meetup JSON REST API, 3/16/2016
Maine WordPress Meetup JSON REST API, 3/16/2016Maine WordPress Meetup JSON REST API, 3/16/2016
Maine WordPress Meetup JSON REST API, 3/16/2016Andre Gagnon
 
Moving Beyond WordPress At Tech in Asia
Moving Beyond WordPress At Tech in AsiaMoving Beyond WordPress At Tech in Asia
Moving Beyond WordPress At Tech in AsiaLester Chan
 
An introduction to Titanium
An introduction to TitaniumAn introduction to Titanium
An introduction to TitaniumGraham Weldon
 
Symfony Live San Francisco 2017 - Symfony @ OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSkySymfony Live San Francisco 2017 - Symfony @ OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSkyPablo Godel
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?Weng Wei
 
Screw HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIRScrew HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIREric Fickes
 
Web to App:作業系統革命 Firefox OS
Web to App:作業系統革命  Firefox OSWeb to App:作業系統革命  Firefox OS
Web to App:作業系統革命 Firefox OSVeck Hsiao
 
Symfony Live San Franciso 2017 - BDD API Development with Symfony and Behat
Symfony Live San Franciso 2017 - BDD API Development with Symfony and BehatSymfony Live San Franciso 2017 - BDD API Development with Symfony and Behat
Symfony Live San Franciso 2017 - BDD API Development with Symfony and BehatAdam Englander
 
Untangling fall2017 week1
Untangling fall2017 week1Untangling fall2017 week1
Untangling fall2017 week1Derek Jacoby
 
Python to go
Python to goPython to go
Python to goWeng Wei
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2Derek Jacoby
 
Untangling spring week11
Untangling spring week11Untangling spring week11
Untangling spring week11Derek Jacoby
 
It Takes a Village to Make WordPress
It Takes a Village to Make WordPressIt Takes a Village to Make WordPress
It Takes a Village to Make WordPressDrewAPicture
 

What's hot (20)

Migrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoMigrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to Go
 
Building a Library Website with WordPress
Building a Library Website with WordPressBuilding a Library Website with WordPress
Building a Library Website with WordPress
 
Untangling the web week 2 - SEO
Untangling the web week 2 - SEOUntangling the web week 2 - SEO
Untangling the web week 2 - SEO
 
Scalable PHP
Scalable PHPScalable PHP
Scalable PHP
 
WordPress for Libraries PreConference Workshop
WordPress for Libraries PreConference WorkshopWordPress for Libraries PreConference Workshop
WordPress for Libraries PreConference Workshop
 
Localizing SharePoint: Adding Multi-language Support to Your Site
Localizing SharePoint: Adding Multi-language Support to Your SiteLocalizing SharePoint: Adding Multi-language Support to Your Site
Localizing SharePoint: Adding Multi-language Support to Your Site
 
Wireless ad hoc distribution
Wireless ad hoc distributionWireless ad hoc distribution
Wireless ad hoc distribution
 
Maine WordPress Meetup JSON REST API, 3/16/2016
Maine WordPress Meetup JSON REST API, 3/16/2016Maine WordPress Meetup JSON REST API, 3/16/2016
Maine WordPress Meetup JSON REST API, 3/16/2016
 
Moving Beyond WordPress At Tech in Asia
Moving Beyond WordPress At Tech in AsiaMoving Beyond WordPress At Tech in Asia
Moving Beyond WordPress At Tech in Asia
 
An introduction to Titanium
An introduction to TitaniumAn introduction to Titanium
An introduction to Titanium
 
Symfony Live San Francisco 2017 - Symfony @ OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSkySymfony Live San Francisco 2017 - Symfony @ OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSky
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
 
Screw HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIRScrew HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIR
 
Web to App:作業系統革命 Firefox OS
Web to App:作業系統革命  Firefox OSWeb to App:作業系統革命  Firefox OS
Web to App:作業系統革命 Firefox OS
 
Symfony Live San Franciso 2017 - BDD API Development with Symfony and Behat
Symfony Live San Franciso 2017 - BDD API Development with Symfony and BehatSymfony Live San Franciso 2017 - BDD API Development with Symfony and Behat
Symfony Live San Franciso 2017 - BDD API Development with Symfony and Behat
 
Untangling fall2017 week1
Untangling fall2017 week1Untangling fall2017 week1
Untangling fall2017 week1
 
Python to go
Python to goPython to go
Python to go
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2
 
Untangling spring week11
Untangling spring week11Untangling spring week11
Untangling spring week11
 
It Takes a Village to Make WordPress
It Takes a Village to Make WordPressIt Takes a Village to Make WordPress
It Takes a Village to Make WordPress
 

Similar to WordPress Rest API

Web APIs: The future of software
Web APIs: The future of softwareWeb APIs: The future of software
Web APIs: The future of softwareReuven Lerner
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentalsAgileDenver
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaGeorge Wilson
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017JoEllen Carter
 
How to Use WordPress in Unexpected Ways: Headless CMS, VR, and Augmented Real...
How to Use WordPress in Unexpected Ways: Headless CMS, VR, and Augmented Real...How to Use WordPress in Unexpected Ways: Headless CMS, VR, and Augmented Real...
How to Use WordPress in Unexpected Ways: Headless CMS, VR, and Augmented Real...WP Engine
 
Exploring Content API Options - March 23rd 2016
Exploring Content API Options - March 23rd 2016Exploring Content API Options - March 23rd 2016
Exploring Content API Options - March 23rd 2016Jani Tarvainen
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPAGil Fink
 
Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеSQALab
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopValeri Karpov
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Igalia
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1Derek Jacoby
 
STC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based ApproachSTC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based ApproachLois Patterson
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesBrent Shaffer
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Twilio Inc
 
Extending WordPress as a pro
Extending WordPress as a proExtending WordPress as a pro
Extending WordPress as a proMarko Heijnen
 
Scaling with swagger
Scaling with swaggerScaling with swagger
Scaling with swaggerTony Tam
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneTroy Miles
 
Approaching APIs
Approaching APIsApproaching APIs
Approaching APIsRoss Singer
 

Similar to WordPress Rest API (20)

Web APIs: The future of software
Web APIs: The future of softwareWeb APIs: The future of software
Web APIs: The future of software
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
 
How to Use WordPress in Unexpected Ways: Headless CMS, VR, and Augmented Real...
How to Use WordPress in Unexpected Ways: Headless CMS, VR, and Augmented Real...How to Use WordPress in Unexpected Ways: Headless CMS, VR, and Augmented Real...
How to Use WordPress in Unexpected Ways: Headless CMS, VR, and Augmented Real...
 
Exploring Content API Options - March 23rd 2016
Exploring Content API Options - March 23rd 2016Exploring Content API Options - March 23rd 2016
Exploring Content API Options - March 23rd 2016
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPA
 
Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружение
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)
 
A Day of REST
A Day of RESTA Day of REST
A Day of REST
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
STC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based ApproachSTC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based Approach
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our Lives
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010
 
Extending WordPress as a pro
Extending WordPress as a proExtending WordPress as a pro
Extending WordPress as a pro
 
Scaling with swagger
Scaling with swaggerScaling with swagger
Scaling with swagger
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and Backbone
 
Approaching APIs
Approaching APIsApproaching APIs
Approaching APIs
 

More from Brian Layman

2016 WordCamp Pittsburgh - Let's Write a Plugin
2016 WordCamp Pittsburgh - Let's Write a Plugin2016 WordCamp Pittsburgh - Let's Write a Plugin
2016 WordCamp Pittsburgh - Let's Write a PluginBrian Layman
 
Let’s write a plugin
Let’s write a pluginLet’s write a plugin
Let’s write a pluginBrian Layman
 
Drupal & Joomla & WordPress.. Oh My! A quick round-up of the three most popul...
Drupal & Joomla & WordPress.. Oh My! A quick round-up of the three most popul...Drupal & Joomla & WordPress.. Oh My! A quick round-up of the three most popul...
Drupal & Joomla & WordPress.. Oh My! A quick round-up of the three most popul...Brian Layman
 
Word Camp North Canton 2013 - Say what? Say that again in plain English...
Word Camp North Canton 2013 - Say what? Say that again in plain English...Word Camp North Canton 2013 - Say what? Say that again in plain English...
Word Camp North Canton 2013 - Say what? Say that again in plain English...Brian Layman
 
WordPress 3.8 Beta 1
WordPress 3.8 Beta 1WordPress 3.8 Beta 1
WordPress 3.8 Beta 1Brian Layman
 
Brethren - What Does It Mean?
Brethren - What Does It Mean?Brethren - What Does It Mean?
Brethren - What Does It Mean?Brian Layman
 
Neo word press meetup ehermits - how to keep your blog from being hacked 2012
Neo word press meetup   ehermits - how to keep your blog from being hacked 2012Neo word press meetup   ehermits - how to keep your blog from being hacked 2012
Neo word press meetup ehermits - how to keep your blog from being hacked 2012Brian Layman
 
Blog World 2010 - How to Keep Your Blog from Being Hacked
Blog World 2010 - How to Keep Your Blog from Being HackedBlog World 2010 - How to Keep Your Blog from Being Hacked
Blog World 2010 - How to Keep Your Blog from Being HackedBrian Layman
 

More from Brian Layman (11)

2016 WordCamp Pittsburgh - Let's Write a Plugin
2016 WordCamp Pittsburgh - Let's Write a Plugin2016 WordCamp Pittsburgh - Let's Write a Plugin
2016 WordCamp Pittsburgh - Let's Write a Plugin
 
Let’s write a plugin
Let’s write a pluginLet’s write a plugin
Let’s write a plugin
 
Drupal & Joomla & WordPress.. Oh My! A quick round-up of the three most popul...
Drupal & Joomla & WordPress.. Oh My! A quick round-up of the three most popul...Drupal & Joomla & WordPress.. Oh My! A quick round-up of the three most popul...
Drupal & Joomla & WordPress.. Oh My! A quick round-up of the three most popul...
 
Unfailing Love
Unfailing LoveUnfailing Love
Unfailing Love
 
Word Camp North Canton 2013 - Say what? Say that again in plain English...
Word Camp North Canton 2013 - Say what? Say that again in plain English...Word Camp North Canton 2013 - Say what? Say that again in plain English...
Word Camp North Canton 2013 - Say what? Say that again in plain English...
 
WordPress 3.5
WordPress 3.5WordPress 3.5
WordPress 3.5
 
Why WordPress?
Why WordPress?Why WordPress?
Why WordPress?
 
WordPress 3.8 Beta 1
WordPress 3.8 Beta 1WordPress 3.8 Beta 1
WordPress 3.8 Beta 1
 
Brethren - What Does It Mean?
Brethren - What Does It Mean?Brethren - What Does It Mean?
Brethren - What Does It Mean?
 
Neo word press meetup ehermits - how to keep your blog from being hacked 2012
Neo word press meetup   ehermits - how to keep your blog from being hacked 2012Neo word press meetup   ehermits - how to keep your blog from being hacked 2012
Neo word press meetup ehermits - how to keep your blog from being hacked 2012
 
Blog World 2010 - How to Keep Your Blog from Being Hacked
Blog World 2010 - How to Keep Your Blog from Being HackedBlog World 2010 - How to Keep Your Blog from Being Hacked
Blog World 2010 - How to Keep Your Blog from Being Hacked
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
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
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
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
 
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
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
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
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
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
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
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
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
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
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
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
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 

WordPress Rest API

  • 1. Brian Layman eHermits Inc, LTD WordCamp Columbus August 27, 2016 A Quick Trip Down the Rabbit Hole
  • 2. • Brian Layman • I work from home • I spend all day on the computer • All best my friends are online • I don’t hang out at parties • I spend my day in a cave like room • Yes, I am an eHermit http://eHermitsInc.com INTRODUCTION
  • 4.
  • 5. FUNDAMENTAL CHANGES IN WP • Plugins – Made WordPress extendable • The NONCE – WordPress is made safe. • Tags – Changed how we reached posts • Plugin & Theme Updates • Shortcodes • Automatic core security updates • Custom Taxonomies • Custom Post Types • Theme Customizer
  • 6. THIS ONE IS DIFFERENT • WP-REST-API • All Inclusive • Externally focused • Not just for us • Language independent • Driven not by community needs but by the direction the web is going • We can’t tell you what all changes this will bring. • This is the path to the next 15 years of WordPress
  • 7. WP-REST-API - WHAT IS IT? • WordPress is moving towards becoming a fully-fledged application framework, and we need new APIs. This project was born to create an easy-to-use, easy-to- understand and well-tested framework for creating these APIs, plus creating APIs for core. • This plugin provides an easy to use REST API, available via HTTP. Grab your site’s data in simple JSON format, including users, posts, taxonomies and more. Retrieving or updating data is as simple as sending a HTTP request. • The API exposes a simple yet easy interface to WP Query, the posts API, post meta API, users API, revisions API and many more. Chances are, if you can do it with WordPress, WP API will let you do it. http://v2.wp-api.org/
  • 8. OK, BUT WHAT IS IT? • An API is an Application Programmer’s Interface • An API is a set way to allow other people to use the code that you’ve created. • REST is Representational State Transfer • It basically is a “language” used to speak to websites using URLS • A collection of URLS through which you can explain • What information you are seeking • What action you want to take • What information you already have and are providing to allow the request to be complete
  • 9. OK BUT WHAT ABOUT THE WORDPRESS PART OF IT • Using URLS you can write an app that can do anything you can do in WordPress* • There might be some lag between when new features get into Word • The most basic examples • List all the posts • https://2016.columbus.wordcamp.org/wp-json/posts • Get all the details about a post • https://2016.columbus.wordcamp.org/wp-json/posts/769 • Get all the details about an attachment • https://2016.columbus.wordcamp.org/wp-json/posts/965 • Get the hashtag for a WordCamp event • https://2016.columbus.wordcamp.org/wp-json/taxonomies/hashtag/terms
  • 10. BUT WAIT THERE’S MORE • The previous page showed Getting information, but you can talk to the API and do more than ask form information • You can GET, POST and DELETE • /wp-json/<object> ~ /wp-json/posts • Get – Returns a collection • Post – Adds a new object • /wp-json/<object>/<id> ~ /wp-json/posts/769 • Get – Returns the specific object • Post – Updates a specific object • Delete – Deletes a specific object
  • 11. WAIT!!! DID YOU JUST SAY DELETE?!? • Yes, you can delete objects with the API. • No – the sky isn’t falling. • The WP-REST-API is safe and the same permissions you have when you are visiting the website through the browser exist for when you visit the website through logging in (or not) • In point of fact you still have to login or identify yourself in one of three ways • A cookie • OAuth 1.0a (like connecting JetPack to Twitter) • Basic Authentication • Sending a username and password with every request • Only do this with an https address
  • 12. OK – HOW ARE WE DOING?
  • 13. WHAT CAN YOU DO WITH THE WP-REST-API? https://backpress.org/ • Anybody remember BackPress? • Core of WordPress without WordPress • A huge leg up because authentication and everything else is already done. • With the WP-Rest-API, this is a freebie
  • 14. FOR USE IN THEMES • Several experimental themes already exist • Picard • Tango - https://github.com/kwight/tango/ • Many other sites are implementing feature level support • Quartz • http://qz.com • Speeds interface through pre-fetching posts and using the local storage feature • New York Times • Live Event coverage • Many SPA websites are coming
  • 15. FOR USE ON DEVICES • Native phone applications • Object-C or any other modern language can speak REST and JSON • Responsive themes can be step 1 for this to get your MVP • Updates from your watch • Server Monitoring • Event Tracking • Jogging routes • Smart House Integration • Webcam
  • 16. DATABASE INTEGRATION • WordPress & Custom Post Types allow you to do more • Custom Post Types and the WP-Rest-API take you that much further again • Video Warehouse – Apple TV powered by WordPress • Photo Albums • Ancestry and Family Tree Applications • Retail Stores
  • 17. LEGACY/INDUSTRY CONVERSION • Because almost all coputer languages can speak REST this is a pathway to get the data from these last millennium platforms into formats newer solutions can use. • This is the source code needed for an IBM AS/400 to post to a REST API • Now WordPress can be the conduit to track the productions of assembly lines. • Dominoes Pizza can show your pizza being assembled. Maybe WordPress Will be used to show your as your Tesla comes through the production line.
  • 18. GETTING CREATIVE • You aren’t limited to what WordPress does now. • You can add custom routes & endpoints to do anything you want. • Form Responses • Force WordPress actions • Reblogging • Dev Environment Clone/Deploy • Import from flatfile (products or phone numbers) • Fetching a new content • You can use other languages to do things that WordPress isn’t good at • Datamining/Machine Learning • Image Cleanup • Specific Cached Data Flushing
  • 19. WHERE CAN I LEARN MORE? • The website: http://wp-api.org (Don’t ignore v1. There’s good content there) • WordPress.TV • Evan Volgas What it is, Why it matters and What you need to know about it. http://wordpress.tv/2016/07/26/evan-volgas-wp-rest-api-what-it-is-why-it-matters-what-you-need-to- know-about-it/ • Jack Lennox’s Building Themes with the Rest API http://wordpress.tv/2015/12/04/jack-lenox-building-themes-wp-rest-api/ • Jeff Well’s Stretching WordPress http://wordpress.tv/2016/06/09/jeff-wells-stretching-wordpress-to-the-limits-using-the-wp-rest-api/ • Jack Lennox’s Single Page Application talk http://wordpress.tv/2016/07/19/jack-lenox-building-single-page-applications-with-the-rest-api/ • Scott Taylor’s WordCamp US talk http://wordpress.tv/2015/12/10/scott-taylor-rest-in-action-the-live-coverage-platform-at-the-new-york-times/