July 2017
Intermediate to advanced
456 pages
11h 32m
English
As we've noted previously, Drupal 8 does not have a default method for listing content. The simplest way of adding this capability is to define a REST resource list using Views. To demonstrate this, we'll create a simple resource that lists nodes that a given user is listed as the author. The first step is to go to Structure | Views and click the Add new view button. Give the View a name, select the checkbox for Provide a REST export, and enter the path for the resource. In this case, since it extends the user information, it would be user/%/posts. When you have that in place, click the Save and edit button.

Read now
Unlock full access