Put the following code in .module file. And enable this module, i am assuming you know how to create module. function mytut_service_services_resources() { $api = array( 'mytut_service_service' => array( 'operations' => array( 'retrieve' => array( 'help' => 'Retrieves story by nid', 'callback' => 'mycallback', 'access callback' => 'user_access', 'access arguments' => array('access content'), 'access arguments append' => FALSE, 'args' => array( array( 'name' => 'fn', 'type' => 'string', 'description' => 'Function to perform', 'source' => array('path' => '0'), ...