Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Jack Lenox - Intro to the REST API - WordCamp A...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
WordPress Greek Community
PRO
November 19, 2016
Programming
400
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Jack Lenox - Intro to the REST API - WordCamp Athens 2016
WordPress Greek Community
PRO
November 19, 2016
More Decks by WordPress Greek Community
See All by WordPress Greek Community
Filippos Karailanidis - Beyond ChatGPT: AI Toolkit for the WordPress Developer
wpgr
PRO
0
59
Orestis Samaras - Modern WordPress Development with Composer
wpgr
PRO
0
46
Eleni Tsertou - Ταχύτερο website με Persistent Object Cache: Μύθος ή Αλήθεια;
wpgr
PRO
0
45
George Korakas - WordPress Security 2025: From Real Threats to Practical Defenses
wpgr
PRO
0
62
Δημήτρης Καρβούνης - Πέρα από το Admin Panel: Πώς να μιλήσεις στο WordPress σαν Developer μέσω REST API
wpgr
PRO
0
46
Αναστασία Αδαμούδη - Δημιουργία σύνθετου μενού πλοήγησης σε block θέματα
wpgr
PRO
0
26
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
PRO
0
57
Jovana Smoljanovic Tucakov - AI vs. Human Content: What Works, What Backfires, and What’s Next
wpgr
PRO
0
66
Λεωνίδας Μηλώσης - Optimize – optimize – optimize: Caring for performance of your WordPress plugin or website
wpgr
PRO
0
50
Other Decks in Programming
See All in Programming
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
350
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
240
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
450
残高管理から台帳サービスへの進化
artoy
0
170
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
190
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
500
R8 の設定見直しでアプリサイズ削減
andpad
0
190
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
830
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.1k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
気持ちぃ〜角丸 Squircle
ryu1013
0
120
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
Featured
See All Featured
We Are The Robots
honzajavorek
0
390
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
390
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
940
KATA
mclloyd
PRO
35
16k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Product Roadmaps are Hard
iamctodd
55
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
310
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
An introduc on to the WordPress REST API Jack Lenox
(@jacklenox) WordCamp Athens 2016
I Greece!
1. The case for a WordPress REST API
What is a REST API?
It stands for REpresenta onal State Transfer Applica on Programming
Interface
Centred around verbs GET POST UPDATE PUT DELETE etc. Different
ways to interact with your data
Usually responds in XML or JSON format XML (Extensible Markup
Language) HTML RSS JSON (JavaScript Object Notation)
Why does WordPress need one?
None
MoMA in New York (c. 2009) Their developers wanted to
use: WordPress as the CMS Ruby to build the front-end Why? I don't know... but they did
None
None
None
Internet of things
So, what is the WordPress REST API?
None
None
Merge meline WordPress 4.4 (8 December 2015) Infrastructure merged No
endpoints WordPress 4.7 (due 6 December 2016) Endpoints merged!
2. How the WordPress REST API works (aka, what the
heck is an endpoint?)
End‐what? REST APIs interprets a URL, and return a response
Not wildly different to RSS Sample request to fetch some posts: wc-athens.dev/wp-json/wp/v2/posts
[ { "id": 1, "date": "2016-11-18T14:08:53", "date_gmt": "2016-11-18T14:08:53", "modified": "2016-11-18T14:08:53",
"modified_gmt": "2016-11-18T14:08:53", "slug": "hello-world", "type": "post", "link": "http://wp-rest-api-demo.dev/2016/11/18/hello-wor "title": { "rendered": "Hello world!" }, "content": { "rendered": "<p>Welcome to WordPress. This is your fi "protected": false } } ]
More endpoints... Single post: wc-athens.dev/wp-json/wp/v2/posts/1 All pages: wc-athens.dev/wp-json/wp/v2/pages All users:
wc-athens.dev/wp-json/wp/v2/users All categories: wc-athens.dev/wp-json/wp/v2/categories
Moar verbs! By default, our calls to the REST API
are GET requests. But we can do a lot more: POST PUT UPDATE DELETE
Authen ca on!
A few ways to authen cate Basic Authen ca on
Quick and dirty Cookie Authen ca on Good, especially for themes and plugins OAuth 1.0 A bit complicated, but versatile OAuth 2 Less complicated than OAuth 1, but requires HTTPS
Brokered Authen ca on apps.wp-api.org
Modifying endpoints
3. Uses for the WordPress REST API
Custom wp‐admin interfaces Calypso HappyTables
Mobile applica ons WordPress apps for iOS and Android Vienna
Themes Picard Anadama Foxhound
Plugins WooCommerce Syndication EDD
Enterprise Guggenheim Quartz Google IO (not WordPress, but...)
Very exci ng mes ahead!
Further reading, and any ques ons? v2.wp-api.org WordPress.tv (search "REST
API") javascriptforwp.com
Ευχαριστώ πολύ! @jacklenox