I am setting up an API using Drupal 7, Services module and services views module. I have got this largely set up and working fine.
I have also installed the module: Node Resources (https://www.drupal.org/project/references) which allows me to associate one node with another. For example, I have a content type called 'Companies' and content type called 'Metrics'. I have added a company node called 'Joe Bloggs Ltd' and have added a metric node 'Employees'. When I set up the metric node I selected 'Joe Bloggs Ltd' from the dropdown.
I have set up a service using service module and service-views (configured fields) to show a list of metrics when I hit: http://example.com/api/metrics/ I get the following:
<result is_array="true"> <item> <title>Employees</title> <nid>19</nid> <metric>10,000</metric> <node is_array="true"> <item>Joe Bloggs Ltd</item> </node> </item> <item> <title>Employees</title> <nid>2000</nid> <metric>20,000</metric> <node is_array="true"> <item>Geoff Bills Ltd</item> </node> </item> </result>
So far so good - however I want to be able to filter these records by the company node. (To be able to go to : /api/metrics/?company=Joe Bloggs Ltd
I thought this would be straight forward as I've done it with taxonomies etc straight forward. I added the Node (field_metric_node) to the 'Filter Criteria Section' and opened it up for exposure as follows:
I set the arg value to be 'company'
And end up with something like this
However when I go to the api endpoint and send the parameter ?company=Joe Bloggs Ltd
I get a blank XML returned.