Hello,
If I have a hook_service_resource() implementation as follows and my url of the end point is
"localhost/services/mylist"; what should be my full url with the two arguments?
function rest_managed_items_services_resources() {
return array(
'myList' => array(
'retrieve' => array( 'help' => 'Retrieves list of managed items',
'callback' => 'rest_managed_items_list_retrieve',
'access callback' => 'rest_managed_items_list_access',
'access arguments' => array('view'),
'access arguments append' => TRUE,
'args' => array( array( 'name' => 'id',
'type' => 'string',
'description' => 'An id String',
'source' => array('param' => 'id'),
'optional' => FALSE,
),
array( 'name' => 'name',
'type' => 'string',
'description' => 'A name String',
'source' => array('param' => 'name'),
'optional' => TRUE,
),
),
),
),
);
}
Thanks for any help.
Comments
url
I think you url should be localhost/services/mylist?id=xzy&name=xyz
Drupal - The modern Lego game
url
/endpoint/resource/index?id=xyz&name=xyz
The 'index' part is what made it work for me, D6, Services 6.3