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.

casivaagustin's picture

Guía para Servicios REST en Drupal 7

Hola, les escribo para compartirles este Doc que escribí sobre servicios REST en drupal 7, es una guía bastante completa que surge del trabajo que realizamos en nuestra empresa y la escribí para que todos los que trabajan en la misma tengamos la misma visión sobre como laburar con el modulo Services y sus amigos.

Espero que les sirva

http://casivaagustin.com.ar/index.php/servicios-rest-en-drupal-7-la-guia/

Read more
thummel's picture

Consuming SOAP for SSO

Hi, I'm looking for a consultant that can help me consume soap for SSO from a third party service.

Read more
foredoc's picture

Integration of Drupal with c/c++ computational server

Hi,

I need to:

1) use drupal-powered web interface to collect user input (parameters);
2) invoke the computational modules/softwares written in c/c++ on a computational server with the parameters collected from the drupal site.
3) return the computational results to the drupal site.

I have been searching on the drupal sites, and I am wondering if Services module fit into my needs. If it is, can anybody give me some hints on how to achieve my goals?

Suggestions are very much appreciated.

Regards,

foredoc

Read more
casivaagustin's picture

Services + Oauth + JWT

Hello everybody, first of all I'm kind of lost here so If I'm not using the right terminology or what I'm saying have no sense please feel free to correct me, second I'm trying to get more information about this subject so any comment is really apreciated.

I'm trying to use Services with the Oauth2 Server but Using JWT.

I enabled the Services module, Created my own custom Endpoints, with no auth, worked perfectly.

I Enabled the Oauth2 Server, configured the server, the clientes, the scope. It worked.

Read more
firoz2456's picture

How to fetch Views total number of records in page.tpl.php before views.tpl called.

See this image http://prntscr.com/7idx70 for more understanding.

I want to fetch Views total number of records in page.tpl.php before views.tpl called. Is it possible to fetch that row total before views rendered? I am also using contextual filter for this view. Views have page type display.

I have also used module https://www.drupal.org/project/views_record_count. but this will print total number of records on Views header or footer. (Not outside of views)

Read more
skybow's picture

Why is a date field posted in one format and returned in a different?

I started working on a C++/Qt library for accessing a Drupal site via Services and a REST server (I'm more into C++ than PHP and Drupal module hacking), when I ran into the following problem: When I retrieve a node via node.retreive request, modify some fields of the returned JSON object and repost the changes via node.update request, Date field content will be killed.

Read more
EmmyS's picture

Unable to log in following quick-start guide (total beginner)

I've just installed the Services module, so I'm very new at this. I'm trying to follow the quick start guide at https://www.drupal.org/node/2424977. I was able to perform the first step (getting a token) using the REST Client add-on for Firefox. But when I try the second step (logging in), it returns nothing. No errors, just nothing.

Any ideas? Screenshot attached (and yes, for this test, "drupal_user" really is my username and password.)

Read more
darkdim's picture

JSON request to form for creating a node

Hi,
Please help to properly create Jason request to send a form to create a node

I get an error:

"form_errors": {
    "field_product][und][form][sku": "SKU field is required.",
    "field_product][und][form][commerce_price][und][0][amount": "Discount Price field is required.",
    "field_product][und][form][commerce_sales][und][0][value": "Sales field is required.",
    "field_timending][und][0][value": "A valid date is required for <em class=\"placeholder\">Valid Until</em>."

what am i doing wrong?

the query such

{"type": "deal","title": "Some title",

Read more
pmunch's picture

Cannot post node as authenticated user from phonegap

Hi all,

I have spent hours trying to figure this out as well as finding relevant code examples, I'm stuck...

I'm building a basic phonegap app that should allow to post a node as authenticated user. I can successfully login, but I cannot further post as this authenticated user thru X-CSRF-Token: I always get 403 - "Access denied for user 001" ...

I summed up the steps I follow in the dummy loginAndPost() function below.

<

pre>
function loginAndPost() {

// Set some vars

var username = "001";
var password = "001";
var server_uri = "http://my-drupal-website";
Read more
klimpab's picture

Service Module and REST: 404 Not found

Hello! I hope that this is the right place.

I strictly followed this guide. The REST Server is activated. I try to access http://localhost/rest/user/token.json (the Drupal installation is at localhost) via the Firefox REST Easy Add-On. No success. It always gives me a "404 Not Found" error.

Under the "Resources" Tab of the Service Module configuration, all resources are enabled. What am I doing wrong?

Read more
dsteplight's picture

Drupal Play Day at The Phase2 Treehouse 330 West 38th Street Suite 1405, New York, NY

Start: 
2015-02-21 12:00 - 17:00 America/New_York
Organizers: 
Event type: 
Training (free or commercial)

https://groups.drupal.org/node/457803

Read more
Chris87's picture

Rest Service path

Hi,
I have been playing with the Services module for a couple of days. According to REST API best practices, the GET URL paths I want to use are:
/buildings
/buildings/4
/buildings/4/rooms
/buildings/4/rooms/5

'Building' and 'room' are both content types, and '4' and '5', the node-ids.

Using the Services module, I can create the following calls:
/node/type=building
/node/4

And with the Services Views module, I can customise the path a little more:
/buildings

But the only way to get a specific building is by:
/buildings?nid=4

Read more
bogdog400's picture

Aggregator Module Extension | consultant

Employment type: 
Contract
Telecommute: 
Allowed

We need some help building a small module that will build an RSS block by implementing hook_aggregator_fetch so the URL will change dynamically with the page.

Let us know your time estimates and preferred payment methods.

Read more
jari.hollsten's picture

Check if a field value is present using json

I'm new to both services and json.
What I would need to achieve is to have a field on registering a new user to be checked if the value is present in another database using json. And if it is, go ahead registering the user otherwise throw an error message.

Read more
swafran's picture

Services REST node create - tnid not set

Hi

I'm using services and rest_server v.7.x-3.7 to update translations on my site.

When creating a node for a translation, I set the tnid, but it is always written in the db as 0.

If I change line 312 of node_resource.inc from:

$stub_node = (object) array_intersect_key($node, array_flip(array('type', 'language')));

to:

$stub_node = (object) array_intersect_key($node, array_flip(array('type', 'language', 'tnid')));

The tnid is properly written to the db and everything works fine.

Read more
freescholar's picture

Power To Connect with VoIP Drupal - Beta Launch!!!

The agaric team has launched the BETA version of PowerToConnect.com We are using VoIP Drupal to enable Event Organizers and participants to send and receive messages using a regular phone.

BoF (Birds of a feather) organizers can send text updates to interested people that have signed up, or attendees can call +1 617 648-5578 and enter the extension of the BoF to hear updates, or subscribe to a Bof and receive txt updates.

Come help us test it out by posting your BoF session, or subscribing to one for DrupalCon Austin!

Read more
ersigui's picture

New install drupal, REST server failed to create a user by using poster(firefox) or postman (chrome).

Hi everyone, after googled around two days, I decided to create a discussion here. I don't know if anyone can noticed this problem. I'm trying to use poster add-on in firefox to create a user in drupal. The parameters are user:test, pass:test, mail:test@test.com. After I post it, drupal created a user called test, BUT! the tricky thing is I can't login by using the username and the pass which I just created. Anyone knows why? My guess is that I config something bad, or miss-installed something. The article I followed is https://drupal.org/node/790416. Thank you, any idea would be nice.

Read more
ldpm's picture

Having trouble accessing arguments from my custom Resource

Hi, I'm new to creating Resources, and I'm having difficulty accessing the raw body from the POST. That body contains JSON that looks like this:


{
“documents” : [ {
“vendor”: “ABC”,
“guid” : “1423700E-7600-4184-A795-BBD17A7969B1”,
“schema” : {
“location” : “http://host.com/org/schema/CA/101”,
“country code” : “CA”,
“version” : “101” }
“entity” : [ { “name” : “Afilias Canada Corp.” } ],
“date last checked” : “2014-01-01”
“date last updated” : “2014-01-01”,
“permit validation” : true,
“fields” : [

Read more
aparnakondala123's picture

Why custom services perform better than services module

I have created custom services module which gives json output and I created a resource using services hook_services_resources().

The custom ones gives response in 200ms where as services module gives in 4sec.

What is the reason? Does it take lot of time for formatting?authentication?access checks?

Steps to reproduce-
Custom way--
1)Install drupal
2)Create a content-type of complicated nested field collections
3)create a menu in custom module
4)output of that menu is drupal_json_output of the node data.

Services way---

Read more
kerry.t.johnson's picture

Cannot create node via Drupal 7 Services REST API

Services 7.x-3.7

I'm trying to POST a new node to my Drupal server (http://blah/rest/node), but the server is always returning an error with the string:

Not found: Could not find the controller

I have the node resource enabled for my endpoint. Within the node resource, the update option is enabled, which, according to the comments, is for both updating and creating nodes:

update: Update or create Node entities based on UUID

Read more
Subscribe with RSS Syndicate content