how to use drupal rest-api?archive.ihsana.net/pdf/installing-drupal-restapi.pdf · how to use...

Post on 07-Jul-2020

54 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

How to use Drupal REST-API?

1. Install modules CORS and checked for enable.

2. Now we can setting cors setting. Go to the Configuration page and choose Cors in Web

Services Panel.

3. Copy this code to domain then click Save button.

*|<mirror>|GET,PUT,POST,OPTIONS|Authorization,Origin,Content-Type,X-CSRF-Token|true

4. Now install REST Server (Services Modules), and also Install required modules in order to set up our

REST server.

5. Now we can create our REST Server. Go to the Structure page and choose Services, and then

click on Add.

We have a few required input fields to fill.

6. After creating Services, we need to set up Service Resources.

Go to “Edit Resources” link next to Our Service, you will see the list of resources, expand

each resource and check the one you would like to use.

and click Save Button.

7. Now it’s time to enable Server Response Formatters and Request parsing.

8. You can test our created resource with REST client:

Example URL

http://your-drupal-site/rest-api/node.json

http:// your-drupal-site/rest-api/node/4

9. How to connect to ionic app builder table, set properties table like this:

And column name according drupal api variable.

top related