Multiple REST endpoints I have an endpoint, which is active and working for more than a year, and I recently had the need to add a new endpoint, which obviously has a different url ("Path to endpoint").

For both, however, I need to use the login functionality, and other custom actions (each one has its own url, callback and access callback, in two separated custom modules).

But on every call, i can see that both endpoints are being requested, all arguments are being doubled etc. Here's the $controller as seen from hook_services_request_preprocess_alter:

Array
(
    [help] =&gt; Array
        (
            [0] =&gt; Description from endpoint 1
            [1] =&gt; Description from endpoint 2
        )

    [callback] =&gt; Array
        (
            [0] =&gt; MY_FIRST_MODULE_callback_function
            [1] =&gt; MY_SECOND_MODULE_callback_function
        )

    [access callback] =&gt; Array
        (
            [0] =&gt; MY_FIRST_MODULE_access_callback_function
            [1] =&gt; MY_SECOND_MODULE_access_callback_function
        )

    [args] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [name] =&gt; email
                    [type] =&gt; string
                    [description] =&gt; Email
                    [source] =&gt; Array
                        (
                            [data] =&gt; email
                        )

                    [optional] =&gt; 1
                )

            [1] =&gt; Array
                (
                    [name] =&gt; email
                    [type] =&gt; string
                    [description] =&gt; Email
                    [source] =&gt; Array
                        (
                            [data] =&gt; email
                        )

                    [optional] =&gt; 1
                )

        )

    [etc] =&gt; ....

)


This happens whichever url is requested, it's causing both the iOS and Android apps to crash, and i couldn't find a way around it.

What should / can I do to run both endpoint independently, and why are both getting invoked even if the url ("Path to endpoint") is different?
Use a distinct resource name, or simply enable the same resource on the other services endpoint to use it there.

To debug issues with the controller, you can check in RESTServer.inc in particular the functions getController and resolveController. Adding some debug/logging code there may help to resolve the issue.