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

1
vote
1answer
17 views

Get all fields for a content type using REST

Is there any way to get all fields attached to an entity in D8 (including widget types), using REST services? I've tried the following endpoints, but none of them had the list of fields: ...
0
votes
0answers
9 views

REST based authoring facility

I intend to use Drupal for a news portal. We have a strong system which is exposed as REST based services in J2EE. Does Drupal have a capability to consume already developed REST services as a ...
0
votes
2answers
16 views

How to make my Drupal custome Service return data on GET?

I have defined few Drupal custom Services and they are working fine via POST requests. But one of them needs to be available via GET. This one: function rooms_services_services_resources() { ...
0
votes
3answers
40 views

Ho to create simple confirmation page

I want to create simple confirmation page. It means that after user change his email then he gets confirmation email with link to page. This link contains token. This link should open page for user ...
0
votes
0answers
21 views

How to build a user authentication workflow with AngularJS using RESTful module?

I'm building a single page app with AngularJS and Drupal as the backend. I'm using the RESTful module. However, I do not have much to go on to build a user authentication workflow. There are several ...
0
votes
1answer
22 views

How do I enable CORS on Drupal 7 Service endpoint?

I tried to call a Drupal service endpoint, exposed by the Services module, using ionic which is built on Cordova. I ran 'ionic serve', so it wasn't serving from the file system but had an actual ...
0
votes
1answer
18 views

No response from Services Entity API when added '.json' to the end of alias

While configuring Services module, when I add '.json' to the end of the resource alias I get an emtpy page. Other resources that are not provided via Services Entity API output json the same way. The ...
1
vote
1answer
14 views

Views Get Data from REST API without creating nodes

I am consuming data via a 3rd party REST API (not a Drupal site). I'd like to minimize double-duty (importing nodes from the API and then displaying that data) and just display the API data directly ...
0
votes
2answers
44 views

Drupal 7 + Services 3 : anonymous user can't access user/register endpoint (401 access denied)

I'm using Services for providing an external webapp to register new user to the Drupal server. I'm able to login from the webapp, create node and post comment. But I can't have access to user ...
0
votes
1answer
11 views

Hiding fields from RESTful services?

So, this may be a stupid question because it seems pretty basic to me, but I can't find any information about this on here or elsewhere. Is it possible to specify fields to be visible/invisible to ...
1
vote
1answer
40 views

JSON format for creating users with custom fields using services

I am using Services module to register new users. My registration form has some custom fields like text field, radio buttons and select list. The following is the data I am sending: { "name" : ...
0
votes
0answers
26 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 ...
1
vote
1answer
33 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
34 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
50 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
49 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
76 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 ...
0
votes
1answer
70 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
121 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
149 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
37 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
41 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
59 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
74 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
41 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
15 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
18 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
36 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
71 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
22 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
18 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
36 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
37 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
18 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
72 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
76 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
82 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
54 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
52 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
60 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
48 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
34 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
98 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
87 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
35 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
64 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
91 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
68 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
31 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 ...