Non-CRUD resource action with Drupal 7 / Services 3 I can't get this simple example working with a custom action.

I had to move it form here How can I create a simple non-CRUD resource action with Drupal 7 / Services 3? to an own question.

The example looks like this for CRUD retrieve:

function mymod_services_resources() {
 $api = array(
   'test' =&gt; array(
     'operations' =&gt; array(
       'retrieve' =&gt; array(
         'help' =&gt; 'Drupal 7 Services 3 test',
         'callback' =&gt; '_mymod_test',
         'access callback' =&gt; 'user_access',
         'access arguments' =&gt; array('access content'),
         'access arguments append' =&gt; FALSE,
         'args' =&gt; array(
           array(
             'name' =&gt; 'fn',
             'type' =&gt; 'string',
             'description' =&gt; 'Function to perform',
             'source' =&gt; array('path' =&gt; '0'),
             'optional' =&gt; TRUE,
             'default' =&gt; '0',
           ),
         ),
       ),
     ),
   ),
 );
  return $api;
}

function _mymod_test($fn) {
  return "Test is working";
}


This works fine and returns for http://myhost.dev/endpoint/test/retrieve

Test is working

But when i try a custom action like this

function mymod_services_resources() {
 $api = array(
   'test' =&gt; array(
     'actions' =&gt; array(
       'custom' =&gt; array(
         'help' =&gt; 'Drupal 7 Services 3 test',
         'callback' =&gt; '_mymod_test',
         'access callback' =&gt; 'user_access',
         'access arguments' =&gt; array('access content'),
         'access arguments append' =&gt; FALSE,
         'args' =&gt; array(
           array(
             'name' =&gt; 'fn',
             'type' =&gt; 'string',
             'description' =&gt; 'Function to perform',
             'source' =&gt; array('path' =&gt; '0'),
             'optional' =&gt; TRUE,
             'default' =&gt; '0',
           ),
         ),
       ),
     ),
   ),
 );
  return $api;
}

function _mymod_test($fn) {
  return "Test is working";
}


http://myhost.dev/endpoint/test/custom returns just a 404

When i try it like this

function mymod_services_resources() {
 $api = array(
     'actions' =&gt; array(
       'custom' =&gt; array(
       ...


It is not shown in the Services list.

@Clive
Yes, i tried to GET that resource. But when i try to POST 

curl -i -X POST --header "X-CSRFToken: p2BMMItuM6QD9HvdPulxS5IBnXDBnczT46VoLLSqJLM" http://myhost.dev/endpoint/test/custom 


i get a
    HTTP/1.1 404 Not found: Could not find the controller.

But this solution - see the comments new user have to last 8 hours to answer own question :)
yields to an other question.

How can i get the whole path, not just index 0
    'source' => array('path' => '0'),

I like to get all path segments after the controller. in my case

myhost.dev/endpoint/test/foo/bar/1/2/3

i liked to get foo/bar/1/2/3 with index 0 i can get just foo.
I got it. I don't have to use myhost.dev/endpoint/test/retrieve in the first example. It is posible to use myhost.dev/endpoint/test/Whateveryouwant. So i understand, i can use the retrieve action and it is not mandatory part of the resource path.