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
9 views

Services: 404 Could not find the controller

I have a strange problem. This is my code: function bd7_services_services_resources() { return array( 'get' => array( 'index' => array( 'help' => 'Ritorna le ...
0
votes
1answer
20 views

Integrating external web application in Drupal

I have an existing web application written in Flask. I want to create a Drupal site that integrates this existing web application, so that the existing webapp will just be a back end, and the Drupal ...
0
votes
1answer
18 views

Howto get ID on newly created content through Drupal 8 REST POST

I have a working decoupled/headless setup working using Drupal 8 beta 10 as a backend, and a html5/js webapp as frontend, on seperate servers. For this scenario, I'm succesfully able to post new ...
0
votes
0answers
39 views

How can I update a node with RESTful Web Services API

I am able to create nodes no problem using this code but I can't seem to be able to update nodes (PUT) using the RESTful Web Services Module. I'm pretty much am using the same code as I found on this ...
1
vote
2answers
32 views

REST Server with my module service returns 404

I have set up my drupal REST using REST Server and services. Also I have created my own module which implements hook_services_resources(). I have configured REST with to use my resource and node. ...
0
votes
1answer
38 views

How do you upload files using the RestWS module?

I have a remote front-end application under development and I would like to interface with Drupal as a backend service, using the RestWS module to create a RESTful service to my Drupal instance (using ...
1
vote
1answer
27 views

drupal_http_request with basic authorization receives 401 response

I am trying to use drupal_http_request to connect to a remote rest-based webservice that users http basic authorization. The following curl command works every time from a command line, and I'm trying ...
2
votes
1answer
75 views

Setting Up Drupal 8 REST Post Request

I am having issues sending a POST request to create a node with Drupal 8 Core REST. Here are the steps I have went through several times. Note that these steps are in effort to produce a working ...
4
votes
1answer
83 views

Authenticated REST requests becoming anonymous user

I'm new to the services and rest_server modules (and RESTful APIs altogether.) As I understand it though, the steps are basically this: Send a post request to /api/user/login with the username and ...
0
votes
1answer
25 views

Drupal 7 Time out when trying to delete user using Services REST API

I am using Drupal 7 and the Services module to manage user. Logging in and creating users works just fine. However, when I try a delete request I either get this response: <b>Fatal ...
1
vote
1answer
30 views

What's wrong with my GET request? (Commerce Services, REST)

I'm developing a mobile app to connect with my Drupal Commerce (Kickstart) store, using a REST server. When I do GET: endpoint/rest/product it retrieves the products list <result ...
1
vote
1answer
29 views

Problem attaching files to nodes with Services

I'm trying to attach files (images) to nodes via Services 3 from an external app using JavaScript. From what I understand (and doing) is: 1) Create a node posting JSON to my endpoint ...
0
votes
0answers
63 views

Restws module exposing custom module content

I'm using RESTws module and access content via /node/id.json. I've written a custom module and use the "hook_entity_property_info" which exposes these fields: { "entity_id": 6655, "cloudinary": { ...
1
vote
0answers
24 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
13 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
17 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
28 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
43 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
19 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
15 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
32 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 ...
1
vote
1answer
29 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
17 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
57 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
71 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 ...
1
vote
0answers
75 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
46 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: ...
1
vote
2answers
39 views

Requesting a new password via services

I need to request a new password via services. I used the URL: <endpoint>/user/password?args['name']=test2 but it returns Access denied for user anonymous It's supposed to be used by non ...
2
votes
1answer
41 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
34 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
29 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
75 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
71 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
1answer
31 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 fids for a image gallery and I can't finish the process, I try 'field_gallery[und][0][]' => array( ...
1
vote
1answer
20 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
51 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
81 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
45 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
29 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
45 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
109 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
32 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
57 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
48 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
37 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 = ...
0
votes
2answers
1k 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
21 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
190 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
319 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
273 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 ...