0

I am creating a REST Get request using Services 3.3 module on Drupal 7.15 which should get all the nodes filtered by a custom field field_asset_type

http://sharedrive/?q=rest/node&parameters[field_asset_type]=13

It returns following error Invalid query provided, double check that the fields and parameters you defined are correct and exist. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_asset_type' in 'where clause'

Kindly tell me how to resolve this problem. The articles on the internet explains how to pass built-in fields which is working but I also need to pass custom fields.

Please help

3

The default functionality only works with node properties, not fields. Fortunately you can use the Services Entity API module to get what you need:

Integration of Services and Entity API.

You can define an endpoint via Services and publish any entity data relying in Entity API.

This module allows to get entities by properties or fields and also paging and related entities that are defined properly.

  • I have custom fields available now but I would also want to filter sub-fields of the custom field. For example I only want field_content['und']['fid'] instead of the whole field_content. – Nisar Ahmed Sep 6 '13 at 10:16
  • Your best bet will be to submit a feature request to the module, a topic that broad isn't something we can deal with here I'm afraid – Clive Sep 6 '13 at 10:18
  • 1
    Well the workaround is to use services_views module which allows a view to be accessed through services module – Nisar Ahmed Sep 6 '13 at 13:39
  • 1
    Just be careful with that module, it's pretty unstable in my experience. – Clive Sep 6 '13 at 13:40

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.