Using web services
Any system that is capable of making an HTTP request can use web services. Covering those topics would be outside of the scope of this book given many different languages, platforms, tools, and capabilities have some support for web services. This section outlines how to invoke endpoints in Drupal using the aforementioned features.
Basic JSON:API examples
A catalog of available JSON:API requests can be generated from /jsonapi
. The following figure shows part of a sample response:
Figure 20.5 - JSON:API catalog response
This response provides a machine-readable response with a series of links to get to the configured resources. Each of the links provides more detail based on the resource. For instance, clicking on the link for block--block provides a catalog of blocks (metadata and block placement), as shown in the following figure:
Figure 20.6 - JSON:API block catalog response
Getting to the structured...