Installation is typical of any Drupal module. Services 3.x does have several dependencies you will need.

Drupal 7 dependencies:

Drupal 6 dependencies:

After getting these dependencies in place you can install as you normally would.
NOTE: Please do well to enable the "REST Server (rest_server)" and / or "XMLRPC Server (xmlrpc_server)" modules as part of the services module, else you will not be able to get drop down options under the Server field when creating or adding a new endpoint.

The main Services administration area is at admin/structure/services. Click on the "Add" link on that page to create a new service definition. You can also use the "Import" link to import a service definition that has been exported from another Drupal website running services. (The Services modules uses a CTools export_ui plugin to support adding, importing and exporting service definitions.)

Services are defined as 'endpoints'. An endpoint is a unique URL stem that acts as a base for all calls. Each endpoint is defined by a combination of URL, server, and authentication. So for instance you could define two REST services, one authenticated and one available for anonymous users, with unique URLS like

http://example.com/api/anonymous/
http://example.com/api/authenticated

In addition to defining a unique URL, the service definition specifies what type of server is used to return data requests (e.g., REST, XMLRPC, etc.):

After the service has been created, you can use its "Edit Resources" button at admin/structure/services to define it further.

  • Use the "server" tab to specify what formatters are used to send and receive information (e.g., JSON, XML, etc.)
  • Use the "authentication" tab to define a system for user authentication (e.g., session authentication, oAuth).
  • Use the "resources" tab to specify what type(s) of objects the service is able to handle (e.g., nodes, users). The resources tab also lets you specify what types of actions are permitted for each information type, including CRUD operations (create, read, update and delete) along with other non-CRUD actions such as listing items, attaching a file, etc.
  • Use the "export" tab to export your service definition as code so that it can be imported elsewhere.

More information on setting up and testing Services resources can be found in the Testing Resources section.

Comments

mdedere’s picture

A good resource to unterstand the module Services is "Services Sandbox. Testing resources on a test server."
http://drupal.org/node/1447020. I wished I explored it first of all!