Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Views Better REST is a Drupal module that enhances the REST export display for views, enabling more flexible JSON output. It allows custom JSON structures, supports exposed filters, pagers, and sorts, and adds URL serializer support.

This module provides a new REST export display for views, which allows return JSON from view in a more flexible way.

Features

* Allow to define a custom JSON structure for the view by adding fields to the display abd overriding their names.
* Allow to use exposed filters with providing possible options for them.
* Allow to use exposed pager with changing number of items per page.
* Allow to use exposed sorts.
* Add URL serializer support.

Post-Installation

Create views, add a display called “Better REST Export” and select to show fields in style.

Set a path, like api/v1/my-view.

Just add fields to the display and override their names to define a custom JSON structure.

If needed, add exposed filters, sorts, and pager to the display.

Easy to use with react-tables.

Similar projects

REST Views — just add useful features over the standard rest export, can be used together with this module.
JSON:API Views — it is working through JSON:API, the path and exposed parameters are not configurable.

Activity

Total releases
2
First release
Mar 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Release date
1.2.0 Stable Mar 8, 2025
1.x-dev Dev Mar 8, 2025