Overview of Services
Last modified: August 3, 2008 - 05:24
Overview
Services is comprised of 2 components:
- services: Modules which contain functions intended to be invoked from remote.
- servers: Modules which provide a connection protocol, such as XMLRPC.
Authentication
Some services such as node.load now check a user's permissions before providing the data. If the user's permission is insufficient, an 'access denied' error is returned.
In order to authenticate, here is the general flow of services requests:
session = system.connect();
user = user.login(session, 'MyName');
node.save(session, mynode);Hooks
services
- hook_service(): This is where you map your services and methods to functions. You can provide help text and argument details for each method, to be used in the service browser.
servers
- hook_server_info(): Specify information about your server.
- hook_server(): Converts an incoming request into a Drupal function call and then converts the result back into the appropriate return format.
