PATCH for updating content entities

User Entity Type

Updating the email and password

Here is an example using the hal_json format:

"pass":[{"existing":"existingSecretPass", "value": "myNewSuperSecretPass"}]

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.

Using a different field for URL ID

In some cases you may wish to use something other than the Drupal entity IDs as the IDs in your API URLs (if, for example, you wish to use some sort of FQN, UUID, or similar for an API that needs to be integrated with other systems that are not aware of the Drupal ID system and have other constraints on IDs).

This can be easily done with restful, though it does take implementing the correct API methods.

By default, restful supports only numeric IDs in URLs. To change this, implement getControllers in your plugin class:

Recipes for RESTful

These are some recipes for common tasks for the RESTful module.

RESTful best practices for Drupal

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


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

Comparison of Web-service client modules

There are several modules in Drupal that act as Web-service clients. Ideally, we'd only have one, but this page attempts to point them out and highlight some differences. At some point, perhaps for Drupal 8, we'll be able to merge all of these.


Subscribe with RSS Subscribe to RSS - rest