Entity Pilot - content staging for Drupal 8

Installation

  • Download and extract the module
  • Add the php-encryption library using composer or Composer manager.
    • For composer - from your Drupal installation directory run composer require "defuse/php-encryption:~1.2.
    • For Composer manager, refer to its documentation

Getting started

PATCH for updating content entities

Here is a practical example on how to update a node.

Let's suppose that we have a node with id 56 whose title we want to update through a PATCH request, authenticating the request with OAuth.

Setting up REST

We need to enable the PATCH method with HAL format and OAuth authentication. This can be done easily using REST UI module.

JavaScript and Drupal 8 RESTful Web Services

This page aims to outline how to use JavaScript to communicate with Drupal 8's RESTful services. It is broken into sections per entity type. It outlines which HTTP method to use (GET, POST, PATCH, or DELETE), the Drupal path to use, which Content-type and Accept headers (see change record #2501221) should be set, and what response can be expected from the server.

RESTful best practices for Drupal

The RESTful module achieves a practical RESTful for Drupal following best practices.

Further documentation and examples can be found at the RESTful module wiki.

Concept

The following also describes the difference between other modules such as RestWs and Services Entity.

Pages

Subscribe with RSS Subscribe to RSS - rest