O'Reilly logo

Drupal 8 Development Beginner's Guide - Second Edition by Kurt Madel, Malabya Tewari, Rakesh James, Krishna Kanth, Edward Crompton, Samuel Keen, Tassos Koutlas, Neeraj Kumar

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

Time for action – creating an API to get all the recipes under a recipe type

Now we will create our next API, which is for exposing all the recipes under a recipe type:

  1. We will have a new view created in the same manner, but instead of selecting Taxonomy terms, we will be choosing contents of all type recipes.
    Time for action – creating an API to get all the recipes under a recipe type
  2. In the REST export settings, give the URL as api/recipes/%. The % sign acts as the wildcard, which will recipe type tid as the argument.
    Time for action – creating an API to get all the recipes under a recipe type
  3. In the views settings page, we configure the view just like we did it for the recipe type. The fields that ...

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