Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WordPress JSON REST API
Search
Rachel Baker
December 15, 2014
Programming
1
430
WordPress JSON REST API
#backboneconf
Rachel Baker
December 15, 2014
Tweet
Share
More Decks by Rachel Baker
See All by Rachel Baker
Real Time REST API with WordPress
rachelbaker
3
1.8k
Build a Theme with the WP REST API
rachelbaker
7
13k
Utilizing the WP REST API
rachelbaker
8
2.3k
Meet the JSON REST API
rachelbaker
1
230
WordPress in Corporate America
rachelbaker
0
180
Introduction to the JSON REST API
rachelbaker
1
210
The WordPress JSON REST API
rachelbaker
3
430
Put Your Content to REST with WP API
rachelbaker
3
1.3k
Kickin' It Old School with the Command Line
rachelbaker
1
110
Other Decks in Programming
See All in Programming
役立つログに取り組もう
irof
24
7.7k
僕がつくった48個のWebサービス達
yusukebe
17
16k
とにかくAWS GameDay!AWSは世界の共通言語!.pdf / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
0
160
EventSourcingの理想と現実
wenas
5
2k
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
170
WEBエンジニア向けAI活用入門
sutetotanuki
0
290
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.2k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
370
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
4
2.8k
Java ジェネリクス入門 2024
nagise
0
530
qmuntal/stateless のススメ
sgash708
0
110
ActiveRecordの力でDBのメタデータを迅速に解析する
lnit
5
2.2k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1365
200k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
The Cost Of JavaScript in 2023
addyosmani
45
6.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
How to Think Like a Performance Engineer
csswizardry
19
1.1k
The Language of Interfaces
destraynor
154
24k
Embracing the Ebb and Flow
colly
84
4.4k
Why Our Code Smells
bkeepers
PRO
334
57k
Agile that works and the tools we love
rasmusluckow
327
21k
Transcript
JSON REST API Current challenges and future impact
Rachel Baker @rachelbaker Senior Web Engineer, Lead Developer, JSON REST
API Project
Democratize Publishing Mission:
USA Today
http://www.vogue.com/
Five Thirty Eight
None
USA Today
Five Thirty Eight
Five Thirty Eight
http://open.nasa.gov/
http://open.nasa.gov/
http://open.nasa.gov/
http://open.nasa.gov/
Powers over 60 million sites Stats: Forbes, 2011
23.3% of active sites Stats: W3 Techs, December 2014
4.0 downloaded 29 million times Stats: WordPress.org, December 2014
Multi-functional
User-friendly
Powered by a popular (and hated) language
Backward compatible
Why do we need an API?
We made it to 11.
Relevance for 11 more years.
69.1% of the web doesn’t use a CMS.
Build new, or iterate on existing features.
None
Continue the mission.
Challenges
60 million distributed APIs.
Drink.
11 years late.
Respect privacy expectations.
Secure authentication.
Different hosting environments.
Different WordPress versions.
Extensible with plugins.
Cannot deploy a bug fix.
Still has to be useful.
Quality clients.
Solutions
Drink.
Slow down we have a responsibility to not screw this
up.
Err on the side of authentication.
Namespaced and versioned routes: wp/1.0/posts pluginname/2.0/events
OAuth1.0a and possibly OAuth2 through WordPress.org.
Educate our community and seek feedback from all communities.
Official client libraries.
Released version 1.0 and encourage everyone to start using it
now.
Many are already using it in production New York Times
Wired 10up Bocoup …and more
Future
None
None
None
Backbone-based WordPress “themes”.
Customized Dashboards.
Customized Dashboards.
Front-end (inline) content editing.
Customized Dashboards.
WordPress has been the gateway drug for tens of thousands
of web developers.
WordPress will be the gateway drug for tens of thousands
of APIs.
Check it out
Read the Documentation wp-api.org
Install the Plugin github.com/WP-API/WP-API
Get the Schema http://example.com/wp-json/
Build Stuff and Give Feedback Posts ✔ ✔ ✔ ✔
Pages ✔ ✔ ✔ ✔ Custom Post Types ✔ ✔ ✔ ✔ Post Meta ✔ ✔ ✔ ✔ Media ✔ ✔ ✔ ✔ Comments ✔ ✔ ✔ ✔ Taxonomies/Terms ✔ ✔ ✔ ✔ Users ✔ ✔ ✔ ✔ GET POST PUT DELETE
Thank you github.com/WP-API
STEP ONE READ THE DOCUMENTATION
STEP TWO Install & Activate the Plugin
STEP THREE GET the API ScHEMA http://example.com/wp-json/
STEP THREE GET the API ScHEMA http://example.com/wp-json/
STEP FOUR GET the POSTS COLLECTION http://example.com/wp-json/posts/
http://example.com/wp-json/ STEP FOUR GET the POSTS COLLECTION
STEPs FIVE - Twenty-Two EXPLORE ALL THE POSSIBILITES Posts ✔
✔ ✔ ✔ Pages ✔ ✔ ✔ ✔ Custom Post Types ✔ ✔ ✔ ✔ Post Meta ✔ ✔ ✔ ✔ Media ✔ ✔ ✔ ✔ Comments ✔ ✔ ✔ ✔ Taxonomies/Terms ✔ ✔ ✔ ✔ Users ✔ ✔ ✔ ✔ GET POST PUT DELETE
STEP Twenty-THREE - ?? Use the JSON REST API Use
the JSON REST API plugin in/for a project. Give us feedback.