Last updated 14 May 2016. Created on 23 November 2014.
Edited by TheodorosPloumis, jeff h, e0ipso. Log in to edit this page.

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.

  • Restful module requires explicitly declaring the exposed API. When enabling the
    module nothing will happen until the implementing developer will declare it
  • Instead of exposing resources by entity type (e.g. node, taxonomy term), Restful
    cares about bundles. So for example you may expose the Article content type, but
    not the Page content type
  • The exposed properties need to be explicitly declared. This allows a clean output
    without Drupal's internal implementation leaking out. This means the consuming
    client doesn't need to know if an entity is a node or a term, nor will they be presented
    with the field_ prefix
  • One of the core features is versioning. While it's debatable if this feature
    is indeed a pure REST, we believe it's a best practice one
  • It has configurable output formats. It ships with JSON and XML as examples. HAL+JSON is the recommended default.
  • Audience is developers and not site builders
  • Provide a key tool for a headless Drupal. See the AngularJs form example module.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.