services

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
vkakani's picture

Retrieve a specific version (vid) of a node : D7

How do we retrieve a specific revision (vid) attributes of a node.

Works : http://mysite.com/endpoint/node?parameters[nid]=5&parameters[vid]=34 [vid=34 is the latest version version id]

Doesn't Works : http://mysite.com/endpoint/node?parameters[nid]=5&parameters[vid]=31 [vid=31 is the second version version id]

Please advise, how to construct the query to pull the a specific version ID related node attributes

Drupal Version : D7

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
Anonymous's picture

April 13 GRupal Meetup

Special guest speaker Ryan Weaver joins us to talk Drupal 8 on April 13!

For more info please head over to our Meetup.com page and join our Meetup.

GRupal - Advanced Drupal Development in Grand Rapids, MI

Read more
robschuh's picture

Guardando campo tipo date con JSON mediante SERVICES

Hola gente, llevo varios días intentando guardar un campo fecha (con JSON) que tengo en un nodo , y por algún motivo en la bd se guarda de forma incorrecta (el campo, porque el nodo y el resto de campos si los guarda bien). El json he probado a ponerlo de mil maneras, finalmente decidí que el tipo de fecha fuera timestamp, pero aún con esas se sigue guardando mal en la base de datos:

He probado mil formas

"field_calendar":{
"und":{
"value":{"date":"1419597000"}

  }

},

"field_calendar":{
"und":{
"value":{"datestamp":"1419597000"}

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
aparnakondala1'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
j. ayen green's picture

Getting restws to do more than respond

Having discovered that Services just can't handle parsing XML correctly (attributes), and that altering the parser list to call simplexml doesn't, in the end, seem to call it, I'm trying my luck with restws, given that it seems to be the direction to head in anyway.

I have configured the path in my module as such:

function mymodule_restws_resource_info() {
    return array(
        'mymodule_person' => array(
            'label' => t('Person'),
            'class' => 'PersonResourceController',
            'menu_path' => 'api/person',
        ),
Read more
dorrisb's picture

How to update node field from Actionscript3 using Services and AmfServer

Hi Folks!

I've set up the services 3 module and all the amfserver/zend dependencies, and can retrieve node information from D7 back into actionscript. However, I am soooo stuck on trying to update node fields back into Drupal. I've run and understand the tests provided by Rolf Vreijdenberger in his Drupal7AmfServer.as file. However, I see no example for doing the node update.

The handlers have been set:
proxy.setHandler("node", "retrieve", onResult, onStatus);
proxy.setHandler("node", "update", onResult, onStatus);

Read more
cheewe's picture

Reducing memory usage for custom resources for services module

I have a Drupal 6.19 site that also links to some mobile app via custom resources written using Drupal Services 3.x module.

I have set php memory limit to 512M. The site works fine without any memory issues.

However, because the mobile app fires 4-5 concurrent web services requests as a burst, a single app running can apprently cause my server to run out of memory and return a 500 Internal Server Error. The log shows this error:
Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /home/cmadmin/public_html/drupal/index.php

Read more
lhridley's picture

Documentation for data requirements for creating nodes through the JSON Restful Server (Services 3, Drupal 7)

We have a project to complete for a client that involves setting up a restful web service backend for a set of mobile apps for Android and iOS. We have elected to use Drupal as our restful server and utilize the JSON service available through Services 3 along with the spyc library.

Read more
Subscribe with RSS Syndicate content