1

I am having issues receiving JSON data of a node with Drupal 8 Core REST. Here are the steps I have went through several times:

  1. Install latest version of drupal 8
  2. Enable all core web services modules (HAL, HTTP Basic Authentication, RESTful Web Services, Serialization)
  3. Go to permissions page. Find RESTful Web Services permissions and allow delete, get, patch, and post for all users.

I created a path using Views module to show JSON format of my website contents and it works fine: http://www.example.com/api/v1/order/

but when I use the following URL to Get the JSON format of a node using POSTMAN or DHC client, it returns HTML format of data!:

http://www.example.com/node/1?_format=json

closed as unclear what you're asking by mradcliffe, Pierre.Vriens, kiamlaluno Jan 24 '17 at 22:10

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Did you enable the json format in node endpoint at /admin/config/services/rest? – Sumit Madan Jan 20 '17 at 12:05
  • Yes, I enabled josn, hal+json and xml format using REST UI module. – Mde Jan 20 '17 at 12:15
  • Well, in latest release there is no permission for REST API endpoints. May be you wanna try the latest release. – Sumit Madan Jan 23 '17 at 5:31
  • I ran into a similar problem. If it helps anyone who finds this later, the core doc suggestion of using curl example.com/node/1?_format=hal_json (seen here: drupal.org/docs/8/core/modules/rest/…) doesn't work. If you just use your browser to go to the address though, you'll see json formatted data. – Caroline Casals Apr 19 '18 at 13:58

Browse other questions tagged or ask your own question.