How to use the drupal 8 native webservices REST API ?
Step 1: Activate RESTful Webservice
Active modules:
HAL (hal)
RESTful Web Services (rest)
HTTP Basic Authentication (basic_auth)
Download and active contrib modules:
REST UI (restui)
Step 2: Configure
Go to the Rest configure page (Administration -> Configuration -> Web services -> Rest )
- Select the service / Url to enable webservice
- Select the Methode (GET/POST/DELETE/PATCH)
- Select request formats (hal_json, json, xml ... Ex, here : hal_json)
- Select Authentication type (here : basic_auth)
Step 3 : Call Web Services
Example : Read a node
http://mysite.com/node/1?_format=hal_json
Comments