Services 3.x

Some of the thoughts behind 3.x can be gleaned from Hugo Wetterberg's presentation from Drupal Camp Stockholm 2009.
In short the big changes from 2.x are:

  • The transition to resources (with CRUD support) from rpc-style services
  • Services endpoints can be placed on arbitrary paths in the menu system and configured completely independently
  • endpoints can be disabled
  • Endpoints can have debugging enabled
  • Endpoints are exportable and can be packaged as features (with or without the Features module).

All this means that modules now can use services to expose APIs - a combination of services, a server and, optionally, an authentication method. And it's those who want to develop these API-providing modules, the services, servers and authentication modules, that is the intended audience for this preview release.

One thing we are looking into is Tests! We currently have tests for all administration tasks. The client->server tests have been written but do not have 100% coverage yet.

Documentation in progress

The links below are designed to help contributors get involved in Services 3.x. If you find any missing or incorrect information below, please feel free to correct it! Things will be moving along pretty quickly and parts of the documentation are sure to fall out of date.

API documentation

Services 3.x - API Documentation

Creating a REST Server with 2-Legged OAuth Authentication (Example with Java Servlet)

Apparently the way to get content from a Drupal site to another site/application is to use services. And also it would seem that using

Creating a resource for Services 3.x

We'll implement a simple service for notes that's exposed using the REST Server. Then we'll implement a simple JavaScript client for note

Services Installation and Setup

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

Testing Services with the node resource

After you have installed the Services module and created a service, you can test whether it is working by enabling a resource and retrieving

Testing resources

For the purposes of these tests, we will be using the user resource but these principles apply to any of the other resources as well.

Using the JSONP response formatter

Due to the same origin policy, it's difficult to communicate with servers on other domains using JavaScript. JSONP ("JSON with padding") is

Videos demonstrating the usage of services 3.x

Services intro video: http://www.youtube.com/watch?v=xv19Li5OaEg

What is and isn't working

Things are moving along nicely, but there are still some pretty big areas that are missing or busted.

Working with REST Server

This is a brief introduction to how the rest server works.

Guide maintainers

Hugo Wetterberg's picture