How to get a Drupal 7 Services 3 custom resource to fire I have a service endpoint defined in a custom module, as well as a custom resource. They both appear in the Services admin pages, with the resource and its operation checked.

When I hit http://localhost/myservice/myresource?myparm=1, I do not make it to the callback for the resource, but do not receive an error message. The log output shows:

Location    http://localhost/myservice/myresource?myparam=1
Message 
Server info main object:

stdClass Object
(
    [module] =&gt; rest_server
    [endpoint] =&gt; myservice
    [endpoint_path] =&gt; myservice
    [debug] =&gt; 1
    [settings] =&gt; Array
    (
    )


)

Which seems to indicate that it is only recognizing the endpoint and not the resource portion of the path.

The defining code is as follows:

function my_feed_ctools_plugin_api($owner, $api) {
  if ($owner == 'services' &amp;&amp; $api == 'services') {
    return array(
      'version' =&gt; 3,
      'file' =&gt; 'my_feed.services.inc', // Optional parameter to indicate the file name to load.
      'path' =&gt; drupal_get_path('module', 'my_feed'),
    );
  }
}

function my_feed_services_resources() {
  $my_resource = array(
    'myresource' =&gt; array(
      'retrieve' =&gt; array(
        'file' =&gt; array('type' =&gt; 'inc', 'module' =&gt; 'my_feed', 'name' =&gt; 'my_feed.services'),
        'callback' =&gt; '_myresource_retrieve',
        'help' =&gt; 'Lorem ipsum.',
        'args' =&gt; array(
          array(
            'name' =&gt; 'myparm',
            'optional' =&gt; TRUE,
            'source' =&gt; array('param'),
            'type' =&gt; 'string',
            'description' =&gt; 'Lorem ipsum',
          ),
        ),
      ),
    ),
  );

  return $my_resource;
}

function my_feed_default_services_endpoint() {
    $endpoint = new stdClass();
    $endpoint-&gt;disabled = FALSE;
    $endpoint-&gt;api_version = 3;
    $endpoint-&gt;name = 'myservice';
    $endpoint-&gt;server = 'rest_server';
    $endpoint-&gt;path = 'myservice';
    $endpoint-&gt;authentication = array();
    $endpoint-&gt;server_settings = array();
    $endpoint-&gt;resources = array(
      'myresource' =&gt; array(
        'operations' =&gt; array(
          'retrieve' =&gt; array(
            'enabled' =&gt; '1',
          ),
        ),
      ),
    );
    $endpoint-&gt;debug = 1;

    return array($endpoint);
  }


and in my_feed.services.inc

function _myresource_retrieve($args) {
  print "args=" . print_r($args,1);
}
You need to wrap your retrieve resource in an actions array:

function my_feed_services_resources() {

  $my_resource = array(
    'myresource' =&gt; array(
      'actions' =&gt; array(
        'retrieve' =&gt; array(
          'file' =&gt; array('type' =&gt; 'inc', 'module' =&gt; 'my_feed', 'name' =&gt; 'my_feed.services'),
          'callback' =&gt; '_myresource_retrieve',
          'help' =&gt; 'Lorem ipsum.',
          'args' =&gt; array(
            array(
              'name' =&gt; 'myparm',
              'optional' =&gt; TRUE,
              'source' =&gt; array('param'),
              'type' =&gt; 'string',
              'description' =&gt; 'Lorem ipsum',
            ),
          ),
        ),
      ),
    ),
  );

  return $my_resource;
}


You can then "fire" it by doing a POST to: ?q=[my-endpoint]/myresource/retrieve.json

Don't forget to attach the X-CSRF-Token header to your POST calls. Its value can be retrieved here: ?q=services/session/token