1

I have a REST API web Application which is in core PHP. Now I want to change that application to Drupal 7. How to use those application in Drupal 7. I am new to REST API services..

2

You should use services module to create rest services in drupal 7. Simply install it and create end point by admin setting form. When will you create this then you can check your end point like this :

http://www.yoursite.com/{end-point}

If this will give success message then you successfully created end point and now you can move forward.

Services module will give some predefined service resource for user, node and comment etc. simply enable those and use them and if you want to create your own services then you should implement hook_services_resources hook, it will create a service resource. It will return an associative array which include api version, operations (create, delete, retrieve), actions etc. You can simply convert your services to drupal just follow some standard that is defined by services module and my recommendation is just look at any resource of this contrib module, for example look at user resource inside services module you will understand it.

0

Another good option (I think) is the RESTful module in D7. It gives you very fine grained control over what is exposed from your API, as compared to Services, which sort of opens the floodgates when it is enabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.