This is the list of recipe types I have in my local development server running in Vagrant (http://www.headless.dev
):
We will create an API URL structured as http://www.headless.dev/recipes
, which will give the list of recipes in my site. Let's get started:
We need to enable the Web Services module from the modules page.
Click on Manage in the administration menu bar and then click on Extend.
Once you are on the Modules page, search for RESTful Web Services and Serialization. Enable both these modules:
Next, we will need to create a REST export views for our recipe types. Views now comes in the core of Drupal 8, which uses the REST export mode to create web services APIs.
Then click on Views:
You will be greeted by the Views landing page, where you can manage, configure, and add new Views. Drupal 8 uses Views extensively to display different data and contents on the site. The Web Services module however does not provide any views by default.
Moving...