Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: HeCAPTe 1.0.2 — Minor update available for module hecapte_captcha (1.0.2). Release: Attribution & Licensing 1.2.1 — Minor update available for module attribution (1.2.1). Release: MCP Sentinel 2.29.0 — Minor update available for module mcp_sentinel (2.29.0). Release: Audit Chain 1.10.9 — Minor update available for module audit_chain (1.10.9). Release: Menu Autopilot 1.4.7 — Minor update available for module menu_autopilot (1.4.7). Release: FileGate 1.11.3 — Minor update available for module file_gate (1.11.3). Release: Download Tracker 1.0.7 — Minor update available for module download_tracker (1.0.7). Release: Directory2Block Slideshow 1.0.8 — Minor update available for module directory2block_slideshow (1.0.8). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Views REST Serializer Extra

Security covered

Part of the Views ecosystem · 211 projects

View on drupal.org

This module adds a new Views style plugin to add additional metadata into the response for REST Export displays in Views with the following:

  • Result items
  • Total results
  • Total pages
  • Items per page
  • Items per page options
  • Current page
  • Typeahead path for autocompleting inputs
  • Available exposed filters
  • Available exposed sorts
  • Available Facets (from the Facets module)

Additionally, you can toggle Facet inclusion on or off for a given display as well as 'rename' the keys in the response. The latter is useful for matching up with frontend implementations that may not match the default property names in Drupal (for instance "data" instead of "results"). The typeahead path can be provided by Search API Autocomplete or be a custom path in your implementation that returns results to the frontend.

This module is best suited for hybrid or decoupled interfaces that lets them access a Views REST display URL and received a JSON or XML response in return with all the information they would need to build a search interface in React, Vue, or similar. The plugin works for REST export displays only and has been used extensively in Search API / Search API Solr setups.

Using this approach will let you build several frontend components quickly while maintaining a consistent backend via Views and agree on the data contract between the frontend and backend or make quick adjustments from the View itself rather than in code.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Aug 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.2 Stable May 19, 2024
1.0.1 Stable Jan 31, 2024
1.0.0 Stable Nov 27, 2023
1.0.0-alpha1 Pre-release Aug 3, 2023
1.0.x-dev Dev Aug 3, 2023