Services

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.

bsenftner's picture

Services client use case question

I have a REST API I've created, and am selling access to it. One of my clients is a mobile developer, with plans for their app to use a single user account for API communications.

Typical use case for their mobile app is proposed to be:
1) login
2) do api operations
3) logout

My question relates to steps 1 & 3 above: will that work with a single user account, and multiple mobile devices using the same user account? Will the logout by one device also logout all other "logged in" devices?

Read more
labas39's picture

Service Return JSON but with 404 Error

Using Drupal 7, I successfully:

I tried http://localhost/js-api/note/1.json and receive the proper json but it also returns a 404 error. In the Apache error log, I have the following error:

Read more
bsenftner's picture

anyone have an example of a remote Flash app login thru Services 3.x REST server?

I have a REST API implemented in Services 3.x. The API uses session authentication. A client wants to access the API from a remotely hosted Flash application. We've placed a crossdomain.xml in our docroot, enabling the client's app to communicate with us, but they are having troubles getting past login.

Anyone have any examples of a REST Login within Flash?

I, personally, don't know Flash...

samuraijack's picture

SERVICES - 406 Not Acceptable; 401 Unauthorized

Hello,

Have anyone worked on the SERVICES module?
This module works properlly but I can`t login on it.

I check connection in Firefox due to "Poster" tools and "HttpRequester" tool. I used link http://10.10.30.100/mk/?q=drupalgap/user/login.json in
"Content Type": application/x-www-form-urlencoded

For Drupal 6:406 Not Acceptable

Drupal 7: 401 Unauthorized: Missing required argument username

I gave for user "anonymous user" i "authenticated user" all possible permissions

cheewe's picture

user.login returns HTML of home page when successful? intended or a configuration

I'm accessing the user.login service via json server from an iPad application. It appears that when it is successful, the web service returns the HTML of the home page, and when it does not, it returns a valid JSON string that provides the error message.

Is this the expected behavior? Or is it my set-up or configuration somewhere. Thanks!

DUG1138's picture

Using the REST service to create a node that includes an 'entity reference' field.

I'm using cURL in PHP to import data with a one-to-many relationship: One "Place" can be related to Many "Documents" (using the "Entity Reference" module).

The syntax I'm looking for is for the last key/value pair in this array:

$node_data = array(
'title' => $title,
'type' => 'place',
'body[und][0][value]' => $body,
'field_place_country[und][0][value]' => $field_place_country,
'field_legacy_id[und][0][value]' => $field_legacy_id,
'field_place_alt_name[und][0][value]' => 'test a',
'field_place_related_document[und][0][target_id]' => $field_place_related_document_id,
);

Read more
mukund_samant's picture

Services 3.x tutorial

Hi Folks,
I am new to services in Drupal and I am finding the module overwhelming.I have searched the net for Tutorials,but could not get a comprehensive one.Also I have a basic understanding of module development concepts.

ltwinner's picture

Using Services to integrate Drupal 7 site with custom iPhone app?

I have to integrate a Drupal 7 site with a custom iPhone app. I need to be able to be able to perform the create, retrieve, update and delete process on the Drupal site using the iPhone app.

I have 20+ content types each with multiple custom fields. So what I need to know is will I have to write my own custom solution or is the Services module able to perform most/all of the functionality for me?

Read more
shushu's picture

Mobile4Social.com - create free Android application for your Drupal site, including push notification

Hello all,

Following the release of the new Google Cloud Messaging, we were able to release our first example for new approach for Drupal/mobile.

Currently all we offer is a combination of several Drupal modules (Google Cloud Messaging, Rules, Services and views) on the Drupal side, and a basic Android application on the other side.

Read more
monaw's picture

Custom user login

(Preface: I am a beginner Group user so excuse my ignorance and feel free to educate me. If this is not the right place to post questions, where should I post questions about Services?)

Read more
j. ayen green's picture

When is Services not needed?

I have a requirement to have a client hit a URL with some json data, and have the site belonging to the URL accept the data and deposit it in a mongo db for later processing to update Drupal mysql data. Likewise, to have the client be able to retrieve data deposited in the mongo db.

This is D7. Looking at Services 3, I'm unclear whether I would handle this as REST (there are no standard Drupal entities being affected), RPC (though I don't see a JSON-RPC server), some other server, or not to use Services at all and just register the two url's from a module and handle it that way.

Crell's picture

WSCCI Web Services Format Sprint Report

A small team met in Paris at the office of Commerce Guys from June 3-5th to discuss Drupal's web services serialization and syndication format needs. In short, "OK, we are going to have all of this fun new routing capability, now what do we do with it?" More specifically, how do we go about serializing Drupal data for consumption by remote programs (either other Drupal sites as in the case of content staging, other non-Drupal sites, client-side applications, or mobile apps), and what protocols and APIs do we make available to manipulate that data?

In attendance were:

The raw notes from the sprint are available as a Google Doc, but as usual are rather disjoint and likely won't make sense if you weren't there. A more complete report is below.

Read more
adasgt's picture

What will be the URL for a REST GET service with multiple arguments

Hello,

If I have a hook_service_resource() implementation as follows and my url of the end point is

"localhost/services/mylist"; what should be my full url with the two arguments?

function rest_managed_items_services_resources() {
return array(
'myList' => array(
'retrieve' => array( 'help' => 'Retrieves list of managed items',
'callback' => 'rest_managed_items_list_retrieve',
'access callback' => 'rest_managed_items_list_access',
'access arguments' => array('view'),

Read more
MacRonin's picture

Starter Services questions D7

Hello,

I haven't really worked with services before but I do have the 20k foot view of what I want to do. So before I started I just wanted to verify a few things.

Read more
nakeddesign's picture

Service 3 is loggin my user off when anonymous requests are made by javascript.

Drupal 6 / Services 3

Today I have successfully created my 1st services 3 retrieve API function. However I am finding that when the request is made the user is logged off.
Previously I was doing the exact same process using menu hooks returning JSON data instead of service URL's. This approach worked very well, but I wanted to make it more robust.

Here's what happens:

Login to drupal as admin.
Browse to a form that has some javascript to pull the data via api - $.getJSON(url/identifier/param.json)
Data is returned as expected.

Read more
mary.sheikhha's picture

how to delete files with rest web services

I upload file in Base64 encoding with rest services(resource_path: file.json)
how can i delete file with rest services?
i now how to delete node('resource_path:node/nid.json' with 'DELETE resource_type')
i test ('resource_path:file/fid.json' with 'DELETE resource_type')
but return 404!

itqn2004's picture

Why module services 3.x don't work with session?

//Load xmlrpc library
require_once('XmlRPC.php');
//Define Facekard server host
$facekard_server = 'localhost';

//Define facekard api server path
$facekard_server_path = '/wsdl/test/services';

//Make connection to server
$connection = new XmlRPC($facekard_server,$facekard_server_path);
//die(print_r($connection));

//Call remote function system.connect to get session id
$system_connect = $connection->call('system.connect');
//die(print_r($system_connect));
//Fetch sessid from xml object
$session_id = $system_connect->sessid;
$pass = '123456';

Read more
aurafeel's picture

web service chronopost

Hi, I am currently finishing my website on Drupal 6.22 and I have to implement one last feature related to chronopost and the checkout process. I have been given this information in the following link and am not quite sure what to do with it:

https://83.240.239.170:7554/ChronoWSB2CPointsv3/GetB2CPoints_v3Service?wsdl

aurafeel's picture

web service chronopost

1
0% (0 votes)
2
100% (1 vote)
Total votes: 1
avinoama2's picture

Using date fields to ajax PUT call

i'm posting it here because i don't know if it is a bug or just me not doing something correct.
so please be gentle ill except any suggestion.

Created an end point for nodes for GET and update

With simple ajax call i am able to get node data according to its node id.
When i put my node back my CCK Date fields seems to be erased....
But i am able to change all other fields ( title, body, etc...)

how do you send your Date Field correct and way is it not in the same format that i get it from the endpoint ?

I'm using drupal 7 and services 3 using json

Subscribe with RSS Syndicate content

Services

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week