A simple Drupal 8 install profile that highlights RESTful interactions with Drupal.
- Install and initialize.
$> npm install $> grunt
- Install the site. Change db url as needed
$> drush @restapi si --db-url=mysql://restapi:restapi@localhost/restapi -y
- Create a user and give them admin (alternatively, configure permissions for another role)
$> drush ucrt --mail=example@example.com --password=pass mytestuser $> drush user-add-role administrator --name=mytestuser
- Create content
$> curl --include --request POST --user mytestuser:pass \ --header 'Content-type: application/hal+json' http://restapi.devl/entity/node \ --data-binary '{"_links":{"type":{"href":"http://restapi.devl/rest/type/node/page"}}, "title":[{"value":"test title"}]}'