As much as the combination sounds appealing as much as it sucks to set it up. I've been spending days now trying to get it working properly. All i need to see that "My endpoint service was created successfully" and my cross domain requests don't return 404 error..

I really like this module but why the hell it's so hard to get it working, and honestly the documentation is too condensed..

So i installed everything well, on Drupal 7 and i also downloaded the little tricky spyc file.. but nothing seems working properly, the endpoint is just vague white screen. Requests on Poster work, however jquery with JSONP always returns 404, this is kinda useless.

I need help please :)

Comments

jaimeah’s picture

Type of resource?

kharbat’s picture

basic stuff.. system connect, user login... etc

ygerasimov’s picture

@kharbat Can you advise what exact call you do with arguments?

Unfortunately services do not work good with cross domain calls. For example you can see #1822556: Trying to save a node cross domain with json or jsonp.

tamasd’s picture

I also have the same problem with a custom endpoint.
This works fine with 3.1, but not with 3.2 (controller not found).

    'foobar' => array(
      'retrieve' => array(
        'callback' => '_foobar_resource_retrieve',
        'access arguments' => array('access content'),
        'args' => array(
          array(
            'name' => 'uid',
            'optional' => FALSE,
            'type' => 'int',
            'source' => array(
              'param' => 'uid',
            ),
          ),
        ),
      ),
    ),

What I have found is that the error is probably around RESTServer.inc:601.

kylebrowning’s picture

WE do have a bug for custom resources here #1848830: Custom GET service without path arg results in could not find controller but I imagine this isnt the problem the OP is having.

kylebrowning’s picture

Status: Active » Closed (cannot reproduce)

System connect and user login and what not are all working just as intended.

#4, Im not sure why that isnt working BUT 'retrieve' is suppose to be in the operations index of the resource array.

Also take a look at #api_version in services.services.api.php

Ive updated the documentation to reflect this change.

hemache’s picture

If you're building a multilangual Drupal site then you should add language prefix to your service endpoint Url. for example, instead of request http://example.com/myapiendpoint/user/token, you should request http://example.com/en/myapiendpoint/user/token or http://example.com/fr/myapiendpoint/user/token

PS. Postman Rest client was misleading. where it returned 404 not found error when requesting user/token despite working fine for other resources like node/99