Fetch Drupal nodes as json by url/title Our Drupal system has the Services module enabled and is able to return nodes as json using the following url format

http://www.example.com/my_endpoint_path/node/123.json

But I want to retrieve a node using the URL alias I set in the URL path settings tab. I hoped the following would work

http://www.example.com/my_endpoint_path/my_pages_URL_alias.json

But it does not. Is there a way to configure Drupal/Services to fetch nodes by that URL rather than the node id?
In Service Module API, Some hooks are presents to help you.
You need to alter or add your own implementation of this service.

The second link is a file where you have the default service implementation.
You can try to alter this configuration with your own by using "hook_services_resources_alter".

I can't test but you can try and custom this snippet :

function YOUR_MODULE_services_resources_alter(&amp;$resources, &amp;$endpoint) {
    $['node']['operations']['retrieve']['callback'] = '_your_retreive_method';
    $['node']['operations']['retrieve']['args']     = array(
        'name' =&gt; 'node_alias',
        'optional' =&gt; FALSE,
        'source' =&gt; array('path' =&gt; 0), // Put your path index here
        'type' =&gt; 'string',
        'description' =&gt; 'The alias node to get',
    );
}

function _your_retreive_method($node_alias){
    // transform your alias to nid
    $path   = drupal_get_normal_path($node_alias);    
    if($path !== $node_alias &amp;&amp; ctype_digit($nid = str_replace('node/','',$path))){
        return _node_resource_retrieve($nid);
    }
    return false;
}


Links :


Service API Docs
File with an implementation of a service