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, ...

Get Drupal 8: Enterprise Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.