Blog Posts

REST and Serialization in Drupal 8 (DrupalCon Portland Session Notes)

Session Link

What is REST in Drupal 8?

  • Accept header: "Accept: application/json" at /node/###

Four components of REST

  • Base formats: JSON, XML
  • URIs: URLs for a resource. Link Relation: link to other entities
  • Media Type: application/json, application/hal+json (_links and _embedded), application/vnd.github+json
  • HTTP Method: GET, POST, PATCH, DELETE. PATCH instead of PUT...update some fields, but not the whole entity

REST and Serialization in Drupal 8 (DrupalCon Portland Session Notes)

Session Link

What is REST in Drupal 8?

  • Accept header: "Accept: application/json" at /node/###

Four components of REST

  • Base formats: JSON, XML
  • URIs: URLs for a resource. Link Relation: link to other entities
  • Media Type: application/json, application/hal+json (_links and _embedded), application/vnd.github+json
  • HTTP Method: GET, POST, PATCH, DELETE. PATCH instead of PUT...update some fields, but not the whole entity

Pages

Subscribe to Blog Posts