#backboneconf
JSON REST APICurrent challengesand future impact
View Slide
Rachel Baker@rachelbakerSenior Web Engineer,Lead Developer,JSON REST APIProject
DemocratizePublishingMission:
USA Today
http://www.vogue.com/
Five Thirty Eight
http://open.nasa.gov/
Powers over60 million sitesStats:Forbes, 2011
23.3% ofactive sitesStats:W3 Techs, December 2014
4.0 downloaded29 million timesStats:WordPress.org, December 2014
Multi-functional
User-friendly
Powered by a popular(and hated) language
Backward compatible
Why do weneed an API?
We made it to 11.
Relevance for11 more years.
69.1% of the webdoesn’t use a CMS.
Build new, or iterateon existing features.
Continue the mission.
Challenges
60 milliondistributed APIs.
Drink.
11 years late.
Respect privacyexpectations.
Secureauthentication.
Different hostingenvironments.
Different WordPressversions.
Extensiblewith plugins.
Cannot deploya bug fix.
Still has to be useful.
Quality clients.
Solutions
Slow downwe have a responsibilityto not screw this up.
Err on the side ofauthentication.
Namespaced andversioned routes:wp/1.0/postspluginname/2.0/events
OAuth1.0aand possibly OAuth2 throughWordPress.org.
Educate ourcommunityand seek feedback from allcommunities.
Officialclient libraries.
Released version 1.0and encourage everyone to startusing it now.
Many are already usingit in productionNew York TimesWired10upBocoup…and more
Future
Backbone-basedWordPress “themes”.
CustomizedDashboards.
Front-end (inline)content editing.
WordPress has been thegateway drug fortens of thousandsof web developers.
WordPress will be thegateway drug fortens of thousandsof APIs.
Check it out
Read theDocumentationwp-api.org
Install the Plugingithub.com/WP-API/WP-API
Get the Schemahttp://example.com/wp-json/
Build Stuffand Give FeedbackPosts ✔ ✔ ✔ ✔Pages ✔ ✔ ✔ ✔Custom Post Types ✔ ✔ ✔ ✔Post Meta ✔ ✔ ✔ ✔Media ✔ ✔ ✔ ✔Comments ✔ ✔ ✔ ✔Taxonomies/Terms ✔ ✔ ✔ ✔Users ✔ ✔ ✔ ✔GET POST PUT DELETE
Thank yougithub.com/WP-API
STEP ONEREAD THE DOCUMENTATION
STEP TWOInstall & Activate the Plugin
STEP THREEGET the API ScHEMAhttp://example.com/wp-json/
STEP FOURGET the POSTS COLLECTIONhttp://example.com/wp-json/posts/
http://example.com/wp-json/STEP FOURGET the POSTS COLLECTION
STEPs FIVE - Twenty-TwoEXPLORE ALL THE POSSIBILITESPosts ✔ ✔ ✔ ✔Pages ✔ ✔ ✔ ✔Custom Post Types ✔ ✔ ✔ ✔Post Meta ✔ ✔ ✔ ✔Media ✔ ✔ ✔ ✔Comments ✔ ✔ ✔ ✔Taxonomies/Terms ✔ ✔ ✔ ✔Users ✔ ✔ ✔ ✔GET POST PUT DELETE
STEP Twenty-THREE - ??Use the JSON REST APIUse the JSON REST API pluginin/for a project.Give us feedback.