Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON:API Views

Pipeline Test Coverage

It creates a JSON:API Resource for each Views display, allowing for easy consumption of that data outside of Drupal.

For a full description of the module, visit the project page.

Submit bug reports and feature suggestions, or track changes in the issue queue.

Table of contents

  • Requirements
  • Installation
  • Features
  • Maintainers

Requirements

Installation

  1. Download and install via Composer:

    composer require drupal/jsonapi_views
  2. Enable the module:

    drush en jsonapi_views

Features

When installed, the module activates a JSON:API resource for every enabled View display. The resource can be disabled per-display by editing the view and unchecking "Expose via JSON:API" in the display's JSON:API settings.

The URL of the JSON:API Views resource is shown while editing a view, based on the view's current preview state (filters, pagination and sorts included).

  • JSON:API resource per View display: /jsonapi/views/{{ viewId }}/{{ displayId }}
  • Pagination: ?page=#
  • Exposed filters: ?views-filter[{{ filter }}]={{ value }}
  • Contextual filters: ?views-argument[]={{ value }}
    • Multiple arguments as such: ?views-argument[]={{ value }}&views-argument[]={{ value2 }}
  • Exposed sorts: ?views-sort[sort_by]={{ sortId }}

Maintainers

About

Mirror of drupal.org/project/jsonapi_views

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages