I'm doing this tutorial to get familiar with the concepts of the Services module. In that tutorial, you implement a custom service for the Services module. Therefore it uses hook_services_services. But there are other tutorials (e.g. An introduction to Drupal 7 RESTful Services) that use hook_services_resources for the same thing. So what is the difference?

1 Answer 1


The first article is incorrect, there is no hook_services_services() (at least not according to any documentation for the services module, nor in my experience).

The correct hook to use is hook_services_resources(). See the docs/services.services.api.php file included with the module for full details.

  • What about this: api.drupalhelp.net/api/services/…
    – Said Savci
    Feb 24, 2014 at 13:58
  • Also wrong - there is no hook_services_services() or hook_service() in the Services module. That file doesn't even exist any more, those docs are woefully out of date
    – Clive
    Feb 24, 2014 at 14:06
  • Could you please point me to a working example with detailed instructions? Whatever I try it doesn't work. I just can't find a working example.
    – Said Savci
    Feb 24, 2014 at 14:17
  • You'll find a working example in the module itself, in the docs/services.services.api.php file. I can confirm that example works perfectly, I've used it as a base for dozens of projects over the years
    – Clive
    Feb 24, 2014 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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