0

I have using a privatemsg module for chating in our site,

Privatemsg

Services

Is it possible to do a web service CRUD operations through this module?

any suggestions?

1 Answer 1

1

Yes, the Services module has an API, details of which you can find in the module files. You can use that API to provide CRUD for anything at all. See Creating a resource for Services 3.x for a full module example.

Since private messages are entities, you might also look to the Services Entity API module for inspiration (or, it you're particularly lucky, a pre-built solution, depends what you need, and whether you can use an alpha release):

This module provides support for all Entity API entity types to Services. All entity types get a standard resource, similar to what Services provides for code entity types such as nodes.

4
  • Clive thanks for you're quick reply,i have another module (achievements) is there,how can i perform web services CRUD operations for that module.
    – RaMeSh
    Sep 27, 2015 at 11:37
  • I'm not familiar with that module, sorry. If it uses the entity API you should be able to use the module I linked to, if not it'll probably need something custom written for it (someone may have already started something in a sandbox module, it's worth searching around. "drupal [module-name] services integration" is usually a good search term)
    – Clive
    Sep 27, 2015 at 12:19
  • I have used services entity api,but here having only CRUD operations Retrieve only available,Create,Update,Delete is not available for privatemsg module.
    – RaMeSh
    Sep 28, 2015 at 8:52
  • i have given URL like this ((localhost/services/emp/entity_privatemsg_message/2)) for retrieveing for user messages,but it will display error["Access denied for user user"],am i doing any wrong?
    – RaMeSh
    Sep 28, 2015 at 11:57

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.