REST Server with my module service returns 404 I have set up my drupal REST using REST Server and services. Also I have created my own module which implements hook_services_resources().

I have configured REST with to use my resource and node.

This works:
http://local/rest/node/1

This does not work (returns 404):
http://local/rest/hotel_search

Here is my module:

function MY_MODULE_services_resources() {
    return array(
        'hotel_search' =&gt; array(
            'retrieve' =&gt; array(
                'help' =&gt; 'Search for Hotels',
                'callback' =&gt; 'MY_MODULE_hotel_search',
                'access callback' =&gt; 'MY_MODULE_access_callback',
                'args' =&gt; array(
                    array(
                        'name' =&gt; 'name',
                        'description' =&gt; 'hotel name',
                        'type' =&gt; 'int',
                        'source' =&gt; 'param',
                        'optional' =&gt; false,
                    ),
                ),
            ),
        ),
    );
}

function MY_MODULE_access_callback() {
    return true;
}


function MY_MODULE_hotel_search() {
    $json = array(
        'name' =&gt; 'response',
        'status' =&gt; 'ok'
    );
    return json_encode($json);
}
With the Services module, the "CRUD" resources are typically mapped only to entities, and routed to each based on the HTTP method:

GET -&gt; Retrieve
POST -&gt; Created
PUT -&gt; Update
DELETE -&gt; Delete


When building a custom service resource, you need to use the actions array when building your resource. In your example, your resources array would become:

return array(
  'my_module_resources' =&gt; array(
    'actions' =&gt; array(
        'hotel_search' =&gt; array(
            'help' =&gt; 'Search for Hotels',
            'callback' =&gt; 'MY_MODULE_hotel_search',
            'access callback' =&gt; 'MY_MODULE_access_callback',
            'args' =&gt; array(
                array(
                    'name' =&gt; 'name',
                    'description' =&gt; 'hotel name',
                    'type' =&gt; 'int',
                    'source' =&gt; 'param',
                    'optional' =&gt; false,
                ),
            ),
        ),
    ),
  ),
);


Your callback can just return an array or object, it doesn't need to encode the result, because Services will automatically do that based on the extension on the URL, e.g. .json.

You'd then make a call to it with a POST to:

?q=rest/my_module_resources/hotel_search.json