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
Jack Lenox - Intro to the REST API - WordCamp A...
Search
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
54
Orestis Samaras - Modern WordPress Development with Composer
wpgr
PRO
0
36
Eleni Tsertou - Ταχύτερο website με Persistent Object Cache: Μύθος ή Αλήθεια;
wpgr
PRO
0
40
George Korakas - WordPress Security 2025: From Real Threats to Practical Defenses
wpgr
PRO
0
53
Δημήτρης Καρβούνης - Πέρα από το Admin Panel: Πώς να μιλήσεις στο WordPress σαν Developer μέσω REST API
wpgr
PRO
0
31
Αναστασία Αδαμούδη - Δημιουργία σύνθετου μενού πλοήγησης σε block θέματα
wpgr
PRO
0
25
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
PRO
0
50
Jovana Smoljanovic Tucakov - AI vs. Human Content: What Works, What Backfires, and What’s Next
wpgr
PRO
0
50
Λεωνίδας Μηλώσης - Optimize – optimize – optimize: Caring for performance of your WordPress plugin or website
wpgr
PRO
0
41
Other Decks in Programming
See All in Programming
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
120
Cloudflare is Agents
chimame
0
190
信頼性の目標を誰も求めてない
shubox
0
440
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
460
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
130
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
540
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.3k
Introducing Stack Pull Request in GitHub
kkamegawa
0
120
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
240
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
470
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
370
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
390
Are puppies a ranking factor?
jonoalderson
2
3.9k
HDC tutorial
michielstock
2
830
Leo the Paperboy
mayatellez
8
2.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
510
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
550
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
490
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
370
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Utilizing Notion as your number one productivity tool
mfonobong
4
560
The SEO identity crisis: Don't let AI make you average
varn
0
550
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
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