Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
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 theArticle
content type, but
not thePage
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 thefield_
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.
- It has configurable Restful resources and Methods e.g POST,GET,DELETE from admin RestUI module and also configurable output formats e.g JSON, XML HAL+JSON.
- Restful API provides views restful services and support output formats
- Audience is developers and not site builders
- Provide a key tool for a headless Drupal. See the AngularJs form example module.
Attachment | Size |
---|---|
Restful resource Restful UI | 33.07 KB |
Restful Views Export | 110.33 KB |