REST is an architectural style to exchange information on a site using Create, Read, Update or Delete operations. Use this tag for questions about exposing a website's resources (e.g. entities such as nodes, users, etc.) as web services in Drupal, compliant to the REST principles.

learn more… | top users | synonyms

0
votes
0answers
33 views

Restws module exposing custom module content

I'm using RESTws module and access content via /node/id.json, which is great. I have written a custom module and use the hook_entity_property_info which exposes these fields: { "entity_id": 6655, ...
1
vote
0answers
7 views

How to use API versioning with the Services module?

I'm using the Services module to produce a REST API. According to the official documentation, there is a way to version services resources. I believe version here means supplying a single API (e.g. ...
0
votes
1answer
8 views

Services 3: How can I get a list of the roles in a system, via the REST API?

Similar to How to Retrieve all Forums, how can I retrieve the list of roles in a system via the Services REST API? This is Drupal 7, Services 3.x. Are roles terms in a taxonomy vocabulary ?
0
votes
1answer
12 views

Services 3: how to create and delete a forum? via POST to taxonomy_term?

I'd like to be able to programmatically create and delete Forums on a Drupal 7 install, via the Services module. I want to send in HTTP requests and have those things happen. I know how to create a ...
0
votes
0answers
19 views

Rest services - login cookie

I'm using Drupal 7. When I POST request to remote site (services_endpoint/user/login) I am able to receive a session name and session id and all other information about user. After that when I open a ...
0
votes
1answer
28 views

Problem with session ID and Drupal cookies when trying to establish a connection with Service Module and http-post

I tried to established a connection between my app and Drupal services. When I try to login to remote Drupal site using Mozilla add-on Poster everything is working... POST request return OK 200 and ...
0
votes
1answer
13 views

Services 3: retrieve the list of posts for a particular forum

From this question, I know how to retrieve a list of forum posts (forum topics?) from drupal. curl -i -X GET \ -H Cookie:SESSe6a353351df0bcafe98787beef=B0YAHD3-reWwwW-kzhqw6A-SgeShSYUAAQQjh \ ...
0
votes
1answer
12 views

Services 3: how to retrieve all forums?

I'm trying to retrieve all Forums on a drupal7 site, using the Services module. I can get a list of all "forum topics" (which I think of as forum entries or forum posts) this way: curl -i -X GET \ ...
0
votes
1answer
16 views

Drupal 7, Services 3.x: how to create a Forum topic post? {error: :“An illegal choice has been detected. Please contact the site administrator.”}

I'd like to be able to create a topic on an existing forum, using the REST API exposed by the Services module. This is drupal7 and services 3.x . via the REST interface, I can successfully: query ...
0
votes
1answer
23 views

Getting a list of nodes of a specific type (eg, forum) via REST API

I am using Drupal 7, with the Services module. I have the REST API enabled. I have successfully done a user.login, and have retrieved the session id and session name, and then constructed the Cookie ...
0
votes
0answers
13 views

Q how to enter API functions in wsclient rest server setting?

I need to add functions from an SDK API reference document to the Drupal7 webservices rest server. I'd like to query them through the wsclient rest server, attached to a feed, to input them as ...
0
votes
0answers
30 views

RESTful web services return 403 forbidden for uc_order_product

I'm using ubercart and RESTful web services module. When I query for node, uc_order, user, etc., it returns data correctly, but when I query for "uc_order_product" I always get 403 Forbidden. ...
1
vote
1answer
53 views

What is wrong in my XML structure to add nodes using a RESTFul web service POST?

I'm using RESTFul Web Services module with Drupal 7. I can log in with basic authentication, get CSRF-token, get nodes, and so on. The problem is with POST/PUT: I cannot get adding nodes to work. I ...
0
votes
0answers
41 views

Drupal, Service Module and REST: 404 Not found

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 ...
0
votes
1answer
32 views

Custom Entity Not Showing in View Creation UI

I started learning Drupal 8 this week. I followed this guide to create a new entity, which I then made available through REST using the following tutorial: ...
2
votes
1answer
32 views

How can I implement a non-CRUD function in hook_service_resources()?

This question is similar to this question but I don't understand how the URLs are modified enough for the answer there to make sense to me. The module adds retrieve and index operations by default. ...
0
votes
0answers
18 views

PUT request services

I've been using the Drupal basic services module with REST from quite some time now. I would like to know if this possible: PUT request: http://.../endpoint/node/{X,Y,Z} Basically, what i want ...
0
votes
0answers
27 views

Post to rest from outside

I am working with REST service of Drupal. First I tried and did this via a module. But now I want to be able to POST to the REST server from outside (like Postman app for chrome does) but then with my ...
0
votes
0answers
34 views

Using EmberJS as a FrontEnd to Drupal

I am just starting to learn more and more about Headless Drupal, and have developed an interest in combining it with an MVC framework like EmberJS. I've only found one good talk on the subject, but ...
0
votes
0answers
54 views

Drupal 8 User Registration with REST

How do you register a user account via REST in Drupal 8? Here's how far I've made it (not sure if this is the right direction though): I've enabled the Form mode resource under ...
0
votes
0answers
21 views

How to insert multi image with restFul service on D7

i have a little issue i try to add to my node with RESTful service on drupal 7 multiple fid for a image gallery and i can't finish the process, i try 'field_gallery[und][0][]' => array( ...
1
vote
1answer
19 views

Associating comments with special pages/module output

I have what one could consider an "irregularity" in a Drupal module. I have this unique case (mostly due to vendor inconsistencies and ever-changing requirements) where when a user requests a certain ...
0
votes
1answer
36 views

How to retrieve specified fields using services?

Using services we can retrieve list of all nodes with different filters and we can get a specific node as well. But is there any way we can specify the fields we would like to retrieve ? Eg: ...
0
votes
1answer
75 views

RESTws POST List (text) field type Error

I'm using RESTws and POSTing a JSON object to "/node". Everything works fine until I include a List text field (checkbox type). The field in question is: ... "field_days_closed_v": ["Monday", ...
1
vote
0answers
34 views

Making a 'contains' type GET query over a REST API, with Services?

I've installed Services (and Services Views) so I can expose my drupal site as a RESTful API. All my filters are working, but not the one that queries a taxonomy term array. Here is an example JSO: ...
0
votes
0answers
27 views

Profile data not showing using REST server

When visiting user profile page /user/1 the page shows the custom profile data (bio, and a few other fields), but when accessing the same resource via rest (using web services), the data isn't ...
0
votes
1answer
31 views

Auto-complete and form auto-populate from wikipedia

I have some taxonomy terms that would benefit from being (at least in part) being based on wikipedia articles. It looks possible to make a request via the wikipedia api in PHP, and then link that to ...
1
vote
1answer
63 views

how to debug drupal_http_request

I'm working on a module that takes a form submission and posts it to a rest api, using the webform validator module's hooks. I'm trying to debug what's going wrong, and I have the following code, ...
0
votes
1answer
30 views

write data in another drupal website / rest

I need to implement the following setup: - master site (drupal 7) - child site (drupal 7) User create/update nodes in the master site. Then the nodes should be copied to some child sites, depending ...
1
vote
1answer
48 views

How to extend/override Rest EntityResource Plugin in Drupal 8

I would like to extend/override the Rest EntityResource Plugin in Drupal 8. I have read everything I can find online and I can see how to create a resource plugin for something other than an Entity ...
2
votes
1answer
46 views

Web services for specific node

I know you can enable Web services for content in Drupal8. You also need to set permissions to make a GET request to content. But I was wondering if it's possible to set for each node if it can be ...
0
votes
0answers
29 views

REST login rejected with valid credentials

I can get a valid response from the server with the following url http://example.com/mysite/my_path/my_alias/retrieve?api-key=my_key the following code returns a 401 $base_url = ...
-1
votes
2answers
735 views

Drupal & Services (REST): how to session authentication [closed]

I have Drupal 7 and Services 3.10 and I want to use Session Authentication. So i have, in my services resource, checked the "login" action for the user resource. Now calling the "base_url" + ...
0
votes
0answers
17 views

Name space in rest service

I'm using the Services module for rest services. Is it possible to add my custom namespace in rest XML output.
-2
votes
1answer
137 views

Creating Custom Weather Module in Drupal 7 [closed]

I'm a beginner at Drupal 7 trying to create a custom module that gets the weather from weather.yahoo.com for my own personal use. I'm not trying to make anything fancy like the Weather module. I just ...
1
vote
1answer
194 views

How to populate an autocomplete using a web service?

I want to populate a form field, an autocomplete widget, with values from an external REST web service without actually importing the data to my database first (on-the-fly). How do I do that? Is ...
1
vote
2answers
215 views

Restws authentication

How can I login to my Drupal in API way and use the rest ws module with API calls? For example, I have a user with name test. I want to login with test user then use API calls with something like a ...
1
vote
1answer
60 views

POST taxonomy item using Services module

I want to POST a new taxonomy item. I'm using Postman in Chrome to test, I'm logged in fine, and I'm posting RAW JSON: { "name": "building", "description": "", "vocabulary" : { "id" : 1, ...
0
votes
1answer
106 views

Restful between Drupal 7 and Androi app - Create node problem

I use restful between Drupal 7 and Android app. I logged in successful and got 3 variable session_id, session_name and token When I use POST method to create node. I getting error : "node type is ...
-1
votes
1answer
234 views

How to deal with SalesforceException: HTTP Method 'PATCH' not allowed [closed]

I've the the Salesforce module mapping in place integrated with Commerce module and I've the following SalesforceException when purchasing the order: SalesforceException: HTTP Method 'PATCH' not ...
1
vote
0answers
101 views

Drupal 7 Services REST - DELETE Request

I'm trying to delete user account via REST api. Here is my code: $service_url = 'http://www.example.com/rest/user/login'; // .xml asks for xml data in response $post_data = array( ...
0
votes
2answers
255 views

Consuming RESTful web services with Drupal 8

Is there any existing Drupal 8 module (on drupal.org, GitHub or anywhere else) that would leverage Guzzle to consume JSON and/or HAL+JSON Web Services over REST? Alternatively, is the recommended way ...
1
vote
2answers
141 views

Import a custom field type record and relate it to a node

I've created a module for a custom field type which selects images from cloudinary. Is there a way to dynamically add entries as part of an import script? I've tried updating the database directly, ...
0
votes
1answer
61 views

third party data source. best way to do

I am trying to display some TV schedule information from a thirdparty json api. I need to know what is the best way to do this. I have tried various module wsclient module,json query plugin, wsclient ...
0
votes
0answers
91 views

Using RESTful web services to get module data

I've created a custom module that we use to access images from cloudinary. When I view content that has this module, in json format for example, the fields are not being returned. I can get it to ...
0
votes
1answer
32 views

How to automate setting up Services or RESTws?

It looks like xmlrpc.php is of almost no use. I want to use XML-RPC to control my sites but I don't want to set up Services or RESTws manually on dozens of sites. It doesn't look like Services has ...
0
votes
0answers
122 views

Authentication REST using Services

I'm make an Rest module, when I start config, I found this problem, I dont know what I'm missing. How to enable authentication ?? **Authentication** No authentication modules are enabled, all ...
0
votes
0answers
82 views

RESTful web services 500 or 406 Error when “£” is in a value

I'm using RESTful web services and Node.js to export a Mongo database into Drupal. This is working fine, however I get the occasional 500 or 406 error. I've narrowed it down to a "£" sign. In node I'm ...
0
votes
1answer
548 views

404 Not found: Could not find the controller in poster

I am getting issue while using the Services module. I created an endpoint with the path 'api' and a custom module with following code. In resource_two.info file I have written name = resource_two ...
1
vote
4answers
265 views

drupal as mobile app backend

Im currently using drupal 7 + commerce for online sales and I have a phonegap app that creates orders. I want to use drupal 7 via a the services module to sync the app sales data with the online ...