restful in drupal 8 and services module - new`n`tasty!

38
Dmytro Olaresko [email protected] om RESTful in Drupal 8 and Services module

Upload: dmytro-olaresko

Post on 14-Apr-2017

325 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: RESTful in Drupal 8 and Services module - New`n`Tasty!

Dmytro [email protected]

RESTful in Drupal 8 and Services module

Page 2: RESTful in Drupal 8 and Services module - New`n`Tasty!

RESTful Drupal Core

RESTful Web Services (rest) Serialization (serialization) Hypertext Application Language (hal) HTTP Basic Authentication (basic_auth)

Page 3: RESTful in Drupal 8 and Services module - New`n`Tasty!

REST UIhttps://www.drupal.org/project/restui

Page 4: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 5: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 6: RESTful in Drupal 8 and Services module - New`n`Tasty!

RESTful Views

Page 7: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 8: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 10: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 11: RESTful in Drupal 8 and Services module - New`n`Tasty!

X-CSRF-Token(POST / PATCH / DELETE)

REQUESTURI: rest/session/tokenMETHOD: GET

RESPONSEGbAqLrLo6K2TZFbXxm65JZCHlSINcm0lIZOsyw5dkJQ

Page 12: RESTful in Drupal 8 and Services module - New`n`Tasty!

`

Page 13: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 14: RESTful in Drupal 8 and Services module - New`n`Tasty!

RESTful Web Services API

Page 16: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 17: RESTful in Drupal 8 and Services module - New`n`Tasty!

Hooks

Page 18: RESTful in Drupal 8 and Services module - New`n`Tasty!

Serialization API

Page 19: RESTful in Drupal 8 and Services module - New`n`Tasty!

ce_sync_rest.services.yml

https://api.drupal.org/api/drupal/core!modules!serialization!serialization.services.yml/8.2.x

Page 20: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 21: RESTful in Drupal 8 and Services module - New`n`Tasty!

Encoder / Decoder

https://www.drupal.org/project/csv_serialization

Page 22: RESTful in Drupal 8 and Services module - New`n`Tasty!

Authentication API

OAuth https://www.drupal.org/project/oauth

Simple OAuthhttps://www.drupal.org/project/simple_oauth

IP Consumer Auth

https://www.drupal.org/project/ip_consumer_auth

OAuth2 Server

https://www.drupal.org/project/oauth2_server

Page 23: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 24: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 25: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 26: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 27: RESTful in Drupal 8 and Services module - New`n`Tasty!

Services Module (4.x)

Page 28: RESTful in Drupal 8 and Services module - New`n`Tasty!

Allows to modify/hook into entities, and add actions/targetable actions or indexes in a standard Non-RESTful Web services way.

Provide endpoint capabilities to put your API behind a centralized URL

Accept header-based negotiation Provide and extension to some of Cores

capabilities. Provide multiple response formats Version your API's

Page 29: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 30: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 31: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 32: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 33: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 34: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 35: RESTful in Drupal 8 and Services module - New`n`Tasty!
Page 36: RESTful in Drupal 8 and Services module - New`n`Tasty!

https://www.drupal.org/documentation/modules/rest https://drupalize.me/blog/201401/introduction-restful-web-servic

es-drupal-8 http://www.slideshare.net/KateMarshalkina/rest-in-peace-52160

880 http://enzolutions.com/articles/2014/12/16/how-to-create-a-rest-r

esource-in-drupal-8/ https://www.acquia.com/resources/webinars/drupal-8-deep-dive-

what-it-means-developers-now-rest-core https://www.drupal.org/documentation/modules/serialization https://entitypilot.com/content/working-normalizers-drupal-8 https://portland2013.drupal.org/session/rest-and-serialization-dr

upal-8.html https://www.drupal.org/developing/api/8/authentication https://drupalwatchdog.com/volume-4/issue-2/protecting-your-dr

upal-8-resources https://dev.acquia.com/blog/apis-in-drupal-8/apis-in-drupal--8-th

e-services-module-/29/03/2016/10136

Page 37: RESTful in Drupal 8 and Services module - New`n`Tasty!

Dmytro [email protected]

Thank you!

Page 38: RESTful in Drupal 8 and Services module - New`n`Tasty!

Dmytro [email protected]

RESTful in Drupal 8 and Services module