This is a discussion and working group for anyone interested in the Services module and related modules. This module was created out of a need for a standardized solution of integrating external applications with Drupal, specifically Flash and Flex applications. Visit the issues page for all bug reports. Also visit the Services Handbook for information and examples.

-enzo-'s picture

Issues trying to call a method in XMLRPC

Hello Folks

I'm trying to code a new service in Drupal 7 using the following code.

Read more
gmak's picture

Getting Started - Help!


I've just started using Services 3 for a project where (eventually) we will be accessing Drupal via webservices. I have the modules installed and everything seems to be working in my tests.

However, as I try to start to try to create nodes, I am running into problems.

I have setup a REST server, with node as one of the resources available. I can create a node, which is stored in the database, but it is only creating the title. It appears that my formatting of the JSON query is not correct, but I can find little to suggest where my problem might lie.

Read more
colinafoley's picture

Services Index node.title search

I was wondering if there is a way to use the default, Services 3.x node resource index action to retrieve nodes through a title search.

For example, if I have a node with the title "Lazy Dog", I'd like to be able to hit['title']=Lazy and have the node return. I know my example URL won't work as is.

Read more
mcflurry's picture

Problem to see services menu

Hi all,

I am a new drupal user and newbie.. I installed the service module in a drupal 6.22 (This drupal is a configured web that is working fine...). My problem starts when I try to configure the module. I can't see the menu option "Services" , also I tried to access to the web http://mysite/myweb/admin/build/services but It doesn't work and I don't receive any error... I am very frustrated because I don't know how I can fix it... I appreciate any help (tips, ideas, things that I have to check....)

Some things:
-> I added permissions to use services module for admin and root

Read more
presm's picture

Services 3.x REST server create update without storing NID on remote site

Im just at the begining of trying to understand services and rest, I have a simple php script that I can use to create resources from my remote site, this works fine as does updating resources when I have the NID to add into the script.

What I cant seem to get my head around is how I link create and updates from a remote site when the remote doesnt have or store the NID, I assumed that perhaps using CCk to store a Unique ID from the remote may be the answer but Im unsure how I would go about retrieving a NID from a REST call with a Unique CCK field.

Read more
lelizondo's picture

Drupanium = Drupal, Services and Titanium Studio documented

Just to let everyone know about a project I started a while ago. Drupanium is a distribution and an app with code and documented examples on how to integrate Drupal, Services and Titanium Studio.

There's also some documentation about the Services REST API.

I hope you like it.

Read more
smerino's picture

Service 3 on Drupal6, how it works

Hello everybody.

I'm trying to use service 3 in drupal6. But I have some problems with it and there isn't any complete tutorial about how to create a service and to test it.

I have installed the module without any problem, I added a new service, and I added some resources to it, but I can't access to that service using the browser, all I get is "not found" error.
I tried to access using:
But the directory services doesn't exist. Did I need to create it?

Read more
themarkahrens's picture

Increase Number of Nodes Returned for Index

I noticed that the index request for nodes returns 20 results on a page. While I can go through multiple pages of values to get all results, it would be preferred if I could tell it that I would like all of the results on a single page. I am wondering if there is a value I can pass in the request to return more than 20 results at a time.

Read more
bwood's picture

Trouble forcing status=0 (unpublished) when using the node resource

Is there a way that I can force a node to be unpublished by using the
node resource?

Requirement: Site A defines a content type 'item' which is published
by default. Site B needs to create 'item' nodes on A, and these
auto-created nodes should be unpublished.

function toolreq_test_create() {
$toolreq_endpoint = variable_get("toolreq_endpoint", "");
  $options = toolreq_service_login();
    if (!is_array($options)) {
     print "error<p>";
  //create a node

$node_data = array(
                         "title"=>"DHC Tool 04 dev",
                         //"status"=> FALSE, //ensure unpublished
                          "status" => 0,
                        "language" => "und", //lanugage neutral

    //use json
$options['headers']['content-type'] = "application/json";
    $options['method'] = 'POST';
   $options['data'] = json_encode($node_data);
  $request = drupal_http_request($toolreq_endpoint . '/node', $options);
Read more
geestring's picture

I've been using Services for simple retrieve calls, and now I need to accept more arguments!

I've been using this custom service for ahwile:

'event' => array(
'retrieve' => array(
'help' => 'Retrieves a single event',
'file' => array('file' => 'inc', 'module' => 'drupalconnect', 'name' => 'drupalconnect'),
'callback' => '_event_retrieve',
'access callback' => '_whatson_resource_access',
'access arguments' => array('view'),
'access arguments append' => TRUE,
'args' => array(
'name' => 'event nid',
'type' => 'int',
'description' => 'The event node id',
'source' => array('path' => '0'),

Read more
Crell's picture

Canonical Entity representation

One place that the Web Services and Context Core Initiative (WSCCI) and Configuration Management Initiative (CMI) overlap is the need to have a standard, canonical format to represent nodes and other entities in non-PHP and non-SQL format. There are a number of places where that is useful:

  1. Including entities in exported configuration, or in configuration files.
  2. Taking a content snapshot in some form other than an SQL dump file (which, you know, kinda sucks for mose uses).
  3. Transferring a node from one site to another for content sharing purposes.
  4. Aggregating content from many sites together for improved searching and cataloging.
  5. Exposing Drupal content to other non-Drupal systems. This is made easier by using non-Drupal-specific formats.

These are all problem spaces that exist in Drupal 7 now, and did back in Drupal 6, too. Various one-off solutions exist. For Drupal 8 we should have a better universal answer to this question, and be able to build common tools to support it. Those can, and should, also influence our API design to help improve external integration.

Read more
colinafoley's picture

Related Modules - Resources for Services

Hey Everyone, I'm working on a project that's going to use the Book module. Looking around, I didn't see a list of related modules that provide Resources for Services.

1) Does anyone know of a list like that?
2) Do people just use the node resource for working with Book module content?
3) Wouldn't it make sense to have contributed modules for Resources of core/popular modules (Book, Blog, Pole, Calendar/Event?)? Perhaps the reason these aren't around/advertised is because people would want them implemented differently?

Read more
bsenftner's picture

Drupal Services 3.0 examples

Here are two example modules I wrote demonstrating how to implement a Services 3.0 based REST API:

They are bare bones, but demonstrate the correct handling for each of the CRUD operations, plus Relationships and Actions.

Read more
Roze's picture

Not able to understand the concept

Hey Guys,
I am not able to understand the concept correctly, as i have been trying to integrate my drupal to the android using services + xmlrpc module.

Things i tried
1. Installed properly and made the settings properly
2. As per various documentations provided , they had asked me to give the endpoint URL directly as

where newxmlrpc is my endpoint.

I use Services 3.1 with Drupal 6.x

My doubt is how can i give an url where even the file/folder is not available in the drupal installation.

Read more
techninja's picture

Create published standards for Drupal REST response formats using services

After using Services for a month and a half, I’ve been amazed at the incredible foundation and modularity set forth, only now to find it lacking a little bit in follow-through. I wish to bring together the movers and shakers of the services module community (and simple services module users) who demand more consistency from the services they provide and support, to help do something about it.

Read more
frankcarey's picture

Porting Key Auth for Services 3 (as a separate project)

So, we are porting the keyauth module for Services 3 here

We need this at sony because of some legacy services we provide. I know there was a lot of discussion about why the module shouldn't get put into services core, so I don't want to rehash that, but I would like to know some of the reasons why it wasn't ported, especially security concerns so that we can make sure that we communicate that to users of this module.

I think the biggest issue was that it was much easier to leverage drupal's built in permissions system?

Read more
sarav.din33's picture

Can any one guide me when i create a new services...

Hi all,
I using Services3.x, D6.

Can any one guide me when i creating a new services through 'http://mysite/admin/build/services/add' after submitting i got the following error.

Error: # User warning: Table 'mysite.services_endpoint' doesn't exist query: INSERT INTO services_endpoint (name, server, path, authentication, resources, debug) VALUES ('asdsad', 'rest_server', 'asdsad', 'a:0:{}', 'a:0:{}', 1) in _db_query() (line 149 of /var/www/html/mysite/includes/

Read more
drupal7er's picture

How to write a service module for Drupal 7 and Services 3.x?

Can somebody please give instructions on how to write a simple service module for Services 3.x and Drupal 7.x? I simply cannot find any that works with D7. Anything! Just a reworked version of echo_service module would do!

At the very least please link to a working example. Thanks.

Read more
mykmallett's picture

Passing arguments as array into xmlrpc

Is it possible to pass a key => value paired array into the xmlrpc request? As I am trying to make a request function that is usable by method requests with differing variable numbers and types

$xmlrpc_result = xmlrpc($server, $method, $hash, $domain, $timestamp, $nonce, $sid, $args, array());

Where $args contains
'variable1' => '1',
'variable2' => '2' etc,

Obviously implode doesn't work to separate the variables in a comma separated list, because the entire list is just string...I can seperate the list into the variable name being the index name like

Read more
mykmallett's picture

Services documentation lacking

Am I the only person finding Services to be very poorly documented? I can't find just basic information about callback arguments or anything, I've spent the last 40 minutes just trying to find out the correct arguments to accept in my custom service and I still haven't found an answer.

Read more
Subscribe with RSS Syndicate content