O'Reilly logo

Drupal 8: Enterprise Web Development by Chaz Chumley, Matt Glaman, Richard Jones, Nick Abbott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required