Using GET to retrieve data
The RESTful Web Services module's entity resource plugin implements a get method that is called when an HTTP GET request is made on an appropriate route. The entity is processed and then returned in the appropriate format requested.
In this recipe, we will enable the REST endpoint for taxonomy term entities through GET through both the JSON and HAL JSON formats. Since there is no user interface provided by the Drupal core to edit the RESTful Web Services settings, we will use a command-line tool to modify the values.
Note
Since both Drush and Console, as discussed in Chapter 9, Configuration Management – Deploying in Drupal 8, in the recipe Using command-line workflow processes, support manipulating configuration objects, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access