Drupal 7 Shareist Integration

By default, Drupal does not have any API endpoints available for third parties like Shareist to access them.

Here are the steps to install and activate a RESTful API for your Drupal 7 site. Note, this may not be supported in Drupal 6.

1. Install These Modules

Chaos Tools
http://drupal.org/project/ctools

Libraries
http://drupal.org/project/libraries

Services
https://www.drupal.org/project/services

RESTful Web Services
https://www.drupal.org/project/restws

Entity
https://www.drupal.org/project/entity

2. Activate Modules

In CTools, you only need to activate the "Chaos tools" item. None of the others are required.

Activate all of the following in "Other"

Activate "Services" and "REST Server"

3. Set up the REST Service

Finally, go into the Admininstration > Structure > Service screen to add the REST Servive. Click the "+ Add" link to add your new REST service.

Choose values for the name of the endpoint and the path to the endpoint. The path is what will be used in the Connect screen for Shareist. So in this case, the REST Server URL will be:

http://yoursite.com/restendpoint/

where http://yoursite.com/ is the url of your Drupal site. This may include a subdirectory if your drupal site is installed in a directory.

4. Configure the Endpoint

After saving your new endpoint, click on the Edit Resources link to configure the Service.

Under the SERVER tab, make sure the application/x-www-form-urlencoded item is checked. This is off by default.

Under RESOURCES, check all of the resources and save it. These all may not be required, but to ensure that everything works, it's best to check them all.

5. Add your Drupal site to the Shareist Connect Page

Go to Connect to add your Drupal site. Use the REST endpoint URL that you created in the above steps.

Tip: If you get a 406 error, you probably missed one of the configuration steps in 4.

Posted on Monday, September 22, 2014 at 12:55:00 PM

Add comment

Signin or Signup to comment