passing contextual filter arguments to views via service end points

1.4k views Asked by At

I created a view that has contextual filter. Then I created a service (using Services module) to serve up views. For example, let's say my service name is search, and my view name is zoos with a contextual filter city. The following url will return the correct contents: http:/?q=search/views/zoos.json http:/?q=zoos/Austin

But if I do the following: http:/?q=search/views/zoos.json/Austin I will get 404 response.

How do I pass arguements to a view when using service? I'm using 7.10 with 3.1 for Services and Views.

I'd appreciate all of your response.

1

There are 1 answers

0
Michael Favia On

I was only able to get contextual filters to work on the "views" resource in the service. I originally tried to create a "service view" and sleect it as the resource but wasnt able to get the endpoint to register my arguments either. If done as a a regular views resurce and specifying the view_id it worked like a charm.

THis seems to be a bug in the module but i wasnt able to devote time to chase it down since the alternative worked for me.