.. Drupal REST test documentation master file, created by
sphinx-quickstart on Wed Jul 9 12:30:47 2014.
You can adapt this file completely to your liking, but it should at least
contain the root toctree
directive.
As setting up a test environment is cumbersome this project provides for a install and test script.
It has a POST script to try posting entities into Drupal 8
DIY HAL POST a node is https://www.drupal.org/node/2098511
Known issues:
Support ConfigEntity via REST <https://www.drupal.org/node/2300677>
_Serve REST errors as application/api-problem+json OR application/vnd.error+json) <https://www.drupal.org/node/1916302>
_How to POST a comment and other relational entities <https://www.drupal.org/node/2300827>
_Drupal 8 <https://www.drupal.org/node/3060/git-instructions/8.x>
_ installDrush <https://github.com/drush-ops/drush>
_Drush aliases <http://drush.ws/examples/example.aliases.drushrc.php>
_ ``$ vi ~/.drush/drupal.aliases.drushrc.php``
Alias file content::
$aliases['d8'] = array ( 'root' => '/Users/clemens/Sites/drupal/d8/www', 'uri' => 'http://drupal.d8', 'databases' => array ( 'default' => array ( 'default' => array ( 'database' => 'drupal_d8', 'username' => 'drupal_d8', 'password' => 'drupal_d8', 'host' => 'localhost', 'port' => '', 'driver' => 'mysql', 'prefix' => '', ), ), ), );
To test HAL navigation install https://github.com/mikekelly/hal-browser
Run $ ./rest.sh
gives:
Run with one of the following argument(s) in order of appearance:
Quick start argument sets are:
Step by step arguments are:
Create a clear install with supporting modules::
./rest.sh install-modules install
./rest.sh hal-set hal config
./rest.sh hal node comment user # writes node/1 comment/1 and user/1 into /data dir
php ./post.php # tries to post new node, comment, user