Loading presentation...
Prezi is an interactive zooming presentation

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Powering APIs with Drupal 8

No description
by

Benjamin Melançon

on 24 April 2014

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Powering APIs with Drupal 8

ask@agaric.com
Made Possible By
Lin Clark
, gittip.com/linclark
{"_links":{"self":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/node\/21"},"type":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/type\/node\/summer_camp"},"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/relation\/node\/summer_camp\/uid":[{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/user\/6","lang":"en"}],"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/relation\/node\/summer_camp\/revision_uid":[{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/user\/0"}],"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/relation\/node\/summer_camp\/field_activity_type":[{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/node\/26"}],"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/relation\/node\/summer_camp\/field_featured_picture":[{"href":""}]},"uuid":[{"value":"dd68c904-997b-4749-9553-839295769129"}],"type":[{"target_id":"summer_camp"}],"langcode":[{"value":"en"}],"title":[{"value":"Camp Arrowhead","lang":"en"}],"_embedded":{"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/relation\/node\/summer_camp\/uid":[{"_links":{"self":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/user\/6"},"type":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/type\/user\/user"}},"uuid":[{"value":"51567066-87c8-46da-8f00-cd89030d45b7"}],"lang":"en"}],"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/relation\/node\/summer_camp\/revision_uid":[{"_links":{"self":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/user\/0"},"type":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/type\/user\/user"}},"uuid":[{"value":"664602a4-9c61-47cc-af00-c2e4a62fc413"}]}],"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/relation\/node\/summer_camp\/field_activity_type":[{"_links":{"self":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/node\/26"},"type":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/type\/node\/activity_type"}},"uuid":[{"value":"8004a05a-ee6d-4ac8-8908-08ec67e902ed"}]}],"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/relation\/node\/summer_camp\/field_featured_picture":[{"_links":{"self":{"href":""},"type":{"href":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/rest\/type\/file\/file"}},"uuid":[{"value":"8659c5dd-c6b9-4771-9a00-ba6cb8ecfe17"}],"uri":[{"value":"http:\/\/definitive8dev.devcloud.acquia-sites.com\/"}]}]},"status":[{"value":"1","lang":"en"}],"created":[{"value":"1397150557","lang":"en"}],"changed":[{"value":"1397225383","lang":"en"}],"promote":[{"value":"1","lang":"en"}],"sticky":[{"value":"0","lang":"en"}],"revision_timestamp":[{"value":"0"}],"log":[{"value":"","lang":"en"}],"body":[{"value":"<p>Located in Natick, MA on the wooded shores of Lake Cochituate, Camp Arrowhead offers a six-week day camp and one-week residential camp that serves children and adults with special needs.<\/p>\r\n\r\n<p>Since 1958, our campers have enjoyed a warm and caring environment where their individual needs are met, while they learn skills to help promote sociability and independence.<\/p>\r\n\r\n<p>The philosophy of Camp Arrowhead is to strengthen each camper&rsquo;s self esteem and foster interaction with peers and staff within the Camp Arrowhead community.&nbsp; Arrowhead provides social and physical recreation for individuals with a variety of special needs who are five years or older.&nbsp; The program is sponsored by the Natick Recreation and Parks Department with the Parents Association of the Handicapped, Inc.&nbsp; The day camp portion runs for six weeks at the Amputee Veteran&rsquo;s Center from July 1, 2013 to August 9, 2013.&nbsp; The residential portion entails a five day\/four night trip to Lion&rsquo;s Camp Pride in New Durham, NH following the end of day camp.&nbsp; Information about dates and fees can be found under the <span><a href=\"http:\/\/camparrowheadnatick.com\/camp\/\" title=\"Day Camp &amp; Residential\">Day Camp &amp; Residential<\/a><\/span> tab.&nbsp; For any additional questions please do not hesitate to contact us.<\/p>\r\n","format":"basic_html","summary":""}]}
Web Services
A mobile phone app retrieves recent news nodes
On-site Javascript creates taxonomy terms from user input
Deploying staging content entities to the production site
A public REST API that allows clients to place commerce orders
A private REST API to migrate third party data into Drupal
Connecting Drupal to external systems
Anything for which someone uses Kimono Labs on your site!
RESTful Web Services (REST module)
Serialization module
HAL module
HTTP Basic Authentication module

Powering APIs with Drupal 8
Get a Specific Node
curl -H "Accept: application/hal+json" --request GET \
http://drupal-8.localhost/entity/node/1
Everything and more will be linked
data.agaric.com/powering-your-api-drupal-8
"I'm not only the Hair Club president, but I'm also a client."
Hypermedia
Also known as
HATEOAS

but probably easier to remember as
HEAS
http://www.infoq.com/news/2011/06/Is-REST-Successful
Klaus Purer
, gittip.com/klausi
RESTful API Modules in Drupal 8 core
as the
Engine
of
Application State
Constraints
Client-Server
Stateless
Cacheable
Layered system
Code on Demand (optional)
Uniform interface
REST
Re
presentational
S
tate
T
ransfer
benjamin melançon

agaric
a web technology collective
send complaints to
ben@agaric.com
and dissenting tweets to
@mlncn
Full transcript