We attempted to HTTP GET data from get action with the service_views with an argument from a view as follows:

http://example.com/services/rest/service_views/get.xml?view_name=VIEWNAM...

To test, use a URI similar to the above from a browser.

There were multiple problems which we tracked down to arguments not being passed from $_GET during from a GET request, and resources not being passed around.

Solved

See patch file attached for 6.x-2.0-beta3

REQUEST - Is this a bug? Can this change be incorporated in next release?

CommentFileSizeAuthor
rest_server.patch1.22 KBthbnelson

Comments

Yacko’s picture

Thanks for this usefull patch !!

lelizondo’s picture

Patch worked for me also. Thanks.

sudhanwa’s picture

I have following versions installed ...
Drupal 6.22
services 6.x-3.1
services-views 6.x-1.x dev

I have enabled services_views module and selected the views resource in the service endpoint config

and i am getting the same 404 error when for .../api/service_views/get from Curl
HTTP/1.0 404 Not found: Could not find resource service_views

Does the same patch apply to the versions i have installed ?

Thanks,
-Sudhanwa

lelizondo’s picture

REST server I think is not compatible with Services 3.x. I would recommend that you migrate to Services 3.x, is really stable.

Take a look at http://drupanium.org/api for documentation on how to use the right paths

sudhanwa’s picture

got it working ...
the resource name is 'views' and not service_views

The curl .../api/service_views/get
should be changed to .../api/views/get

the complete curl command is as follows -
curl -v http://testdrupal/api/views/viewname.json?args=arg1&display_id=default

sudhanwa’s picture

Hi lelizondo - i did not understand your comment - "REST server I think is not compatible with Services 3.x. I would recommend that you migrate to Services 3.x, is really stable."
I am already on services 3.x, you are asking me to move to 3.x, again. Have i misunderstood something ?

BTW, someone please point me to the stable version of services_views for my drupal and services versions . The version i am using seems to be a dev version.

kenorb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.