RESTful Web Services in Drupal 8 quick start guide – Hacker Noon

What is a Web Service?

A little bit about the Internet of things, mobile apps and other stuff

Assume you have two computers connected to the Internet, both are on the different continents. To communicate with each other they need a unified language. This is a key — the web service is a standardized way for two computers to interact. In the age of the ‘Internet of Things’ (IoT), anything connected to the Internet can be a computer (even your microwave oven).

So computers or devices can use the same API (an application program interface) to understand and interact with each other without any human intervention. We can use API’s in everyday life and don’t know about that (e.g. when we connect a phone to the computer).

For example, your mobile app can communicate with Drupal site to create a node or change and delete an existing one. That’s how it works: using REST API, the mobile app makes a request and Drupal site responds with structured data (e.g. JSON) which an external app can use. So, the external app can be a JavaScript framework, that used for front-end of site display, but all backend logics still belongs to Drupal. And even more…

REST is just another one way to make the Web Services work. There are also other formats such as XML-RPC, SOAP, etc.

Let’s take a look at REST abilities of Drupal 8.

read original article here