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

Rest OPTIONS route

I have a custom route defined which needs to respond differently to different types of request methods. It works with GET, POST, PUT and DELETE, however for some reason an OPTIONS call never reaches ...
0
votes
0answers
13 views

How to post summary and body using REST

I am using Drupal rest api in D8, to post articles. However, I would like to be able to post both the summary and body. Specifically, I am interested in learning how I can post body content, for the ...
0
votes
0answers
7 views

Custom webservice with OAuth [on hold]

I want to create a custom webservice behind OAuth authentication, and I want to use the standard Rest capabilities in Drupal 8 together with the OAuth module. Does anyone have any resources in how to ...
0
votes
0answers
21 views

How to create entities on another site using the Web Services Client module

I have installed the Web Services Client module, together with the Drupal Services module and Rules, in order to create, edit and delete entities on a remote Drupal site. The remote Drupal site has a ...
2
votes
2answers
70 views
+100

How do I create and synchronize product fields with entity fields on another site

Case description: I have one centralized 'Asset management' Drupal website "A" (something like a simple ERP site) which manages the administration of purchased Assets, being ECK entities. The assets ...
3
votes
1answer
32 views

Rest full web service API url is changed in d8

I have rest service url for a node in d6 as https://192.168.1.236/rest_endpoint/node/1140.json but the same url in drupal 8 is not working at all , for d8 i have to give ...
1
vote
1answer
76 views

PUT method using drupal_http_request

I need to update data in HP Quality Center with Drupal. After login with success, I get some data from QC with the following code (simplified): $headers = array('Cookie' => $cookie); $request = ...
0
votes
1answer
12 views

Quiz evaluation via rest service

I have created a web service which expose the quiz node and their properties. If user take the quiz I want to evaluate that quiz via rest service api. How can I do this? Is there any existing module ...
0
votes
1answer
43 views

Consume nodes from REST export views

I am trying to import nodes from a different domain's REST export view. I am able to get all serialized nodes from the view through Guzzle but once I try to create a node from the hal+json response I ...
0
votes
1answer
25 views

How to expose paging data in REST export views

How to allow views to export paging data along with entities? I can set pager, and it works of course, for example my_view?page=1 displays something like [ {...}, {...} ] but I only get list ...
0
votes
0answers
31 views

How do I deliver a nested JSON array for content reference with export view display?

I created a product content type with content reference to article(one product to many articles). Then I added field "Content: ID" "Content: Title" and "(field_article: Content) Content: Title" to a ...
1
vote
0answers
15 views

How do I store data in entities text-list and field-collections?

I have retrieved data from an external database using REST. Now that it is cached in my Drupal 7 site in tables, I need to create new nodes of a specific content type. Works fine for most fields ...
1
vote
1answer
23 views

Services for Privatemsg module

I am using privatemsg services module to create REST API of privatemsg using Services Module in Drupal 7. If I send GET request to this url : http://example.com/rest/privatemsg/ I get all messages ...
0
votes
0answers
10 views

jDrupal - login problem

Does jDrupal fully work with Cordova? I can get nodes, but login doesn't work. jDrupal.connect().then(function() { jDrupal.userLogin('TestUser', '123456').then(function() { var user = ...
1
vote
1answer
27 views

REST interface to custom entity type getting constant 403's

I created my module and the entity definition using the drupal console. It has not been modified at all. My entity is for a user but for various reasons I won't be using the pre existing user entity. ...
0
votes
1answer
17 views

Post method not working on non-CRUD methods

I'm just trying to create custom rest service action but I can't get it. I have created end_point called "testing". Whenever I try to post the data it shows access denied for authenticated user. Where ...
0
votes
0answers
22 views

403 error on creating node using REST

I am trying to create an article node using REST API, but i keep getting 403 error. I have given necessary permission. I am trying it with admin login, curl --include --request POST --user ...
0
votes
0answers
37 views

Upload an Image File using REST API in drupal 8 (Using multipart/form-data)

I want to send an image file using REST API in Drupal 8 along with a registration form. I have built a custom API to save the registration form. For the files i have created another API to save data ...
1
vote
1answer
18 views

Comments are Posted anonymously

I am using Services Module in Drupal 7. When I try to POST comments, these comments are Posted anonymously. I am sending POST request to ?q=endpoint/comment.json with this Body { ...
0
votes
1answer
33 views

Can't save location when posting node through services module

I am using services module to post nodes using rest/json. The nodes also contain images and location. So far I can upload the image and save the node, but the location is not saved. I receive no ...
2
votes
1answer
61 views

How to login into Drupal 8 using the REST API? [duplicate]

Ok i've spent my whole afternoon trying to get this running: Setup a freshly installed Drupal 8 Activate the WebServices (HAL, HTTP Basic Auth, Restful Webservices, Serialization) Install REST UI ...
0
votes
0answers
16 views

Statistics of REST calls

I have client app and i call content by REST GET. I want to have statistics of this calls. For now every time i make get a also make a post with incremented value 'counter'. But thats not good way. It ...
0
votes
1answer
36 views

DateTime iso format in api

I have created an api that filter out unixtime format. Currently, we can filter using /api/blogs?filter[created][value]=1426766400&filter[created][operator]=">="&api_key=DEMO_KEY That ...
0
votes
0answers
13 views

make http request with drupal entityforms

Im complete new with making http request. I have for my users on my Drupal site the possibilty to calculate their own cost. This is done in a entityform. The outcome from the calculation is coming ...
0
votes
0answers
25 views

Custom services returns null

I have extended services module and created a custom web service to get and post data. The problem is on the first rest call I get proper response but on the next response I receive "null" where as in ...
3
votes
0answers
36 views

How to edit output of a field in Views

I am creating REST API using Services Module in Drupal 7. I have created a View to Get lists of Groups. In this view I have added a Field privacy which will tell if the group is Private or Public. ...
0
votes
0answers
18 views

How to call webservices from php on drupal 7 [duplicate]

I want to call a php webservices(REST) on my Drupal site. How to do that. And how to display the result in a page/block. Never have worked before with REST and have idea how i can fulfil the process ...
0
votes
0answers
14 views

Restful API: Change date format from unixtime to ISO-8601 [duplicate]

Applying the date_iso8601 Drupal function in a simple process_callbacks on the public_fields in the class file for each date field works to convert the output/display of the date format, but does not ...
0
votes
0answers
9 views

View contextual filter - rest

How to use contextual filter in view by rest calls? I cant get it to work whole day. I made View with "Provide a REST export". I added contextual filter. But it doesnt work. Thanks
0
votes
0answers
14 views

REST view not accepting path URL

The REST view sometimes does not recognize the path I've assigned to it. It works most of the time, but when it does not work, I have no idea what's wrong as I follow exactly the same steps. I ...
0
votes
0answers
16 views

How can I collect webform data from 500 Drupal sites as entities in a centrally managed Drupal site?

The scenario is as follows: I have 500 products, each has its own webpage and domain on an Aegir (BOA) server. I want to collect data that customers submit. To start with a simple example: the ...
-1
votes
1answer
25 views

Using a rest plugin or a service how can one tell the token module the response is not cachable

I have a rest plugin which returns an array and sends a mail. When commenting the Token::replace all works fine, the token replace function creates a BubbleableMetadata object (from what I understand ...
1
vote
0answers
13 views

Access statistic from rest calls [on hold]

I am able to get content of articles with rest calls. I want to make module, with statistics, what article was read the most. (read = by rest calls...not by views on page). Thanks.
1
vote
0answers
16 views

Displaying Sub-content Types for RESTful Views in Drupal 8

I have two entities (Content types in Drupal 8), foo and bar, for which I've added basic RESTful views, /foo and /bar. These work fine. I've also added bar as field in the foo Content type (a foo may ...
0
votes
0answers
14 views

Services node retrieve -> Access restriction

I am currently working on a project where i am exposing some nodes from a specific content type via services. For the scope of the project I only allow retrieving of nodes from that specific content ...
1
vote
1answer
58 views

Creating node via REST POST gives “leaked cache metadata” error

I'm trying to create new nodes by POSTing to /entity/node?_format=json. This is the body I'm sending: { "_links": { "type": { "href": ...
2
votes
1answer
44 views

Can't log in user with Rest service [duplicate]

i'm trying to build a Headless Drupal app with symfony, i'm stuck with login, i build a custom module for drupal 8 with four functions, (login,logout,register,login_status): <?php /** * @file * ...
0
votes
0answers
20 views

POST regular JSON to custom RestResource

So I created my own RestResource, like so: /** * Provides a resource to get/create content data. * * @RestResource( * id = "mycontent_content", * label = @Translation("My content"), * ...
1
vote
1answer
23 views

How to get in Views RESTful API non latin's letters on fields?

With this guide, I do my RESTful API view (through core modules: RESTful Web Services and Serialization). Ater go to API page, I get this JSON: [{"title":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 ...
0
votes
1answer
24 views

Content REST view does not work because of moderation states

I've created a simple view using the REST export to export all published content in JSON format, but I get this error: Symfony\Component\Routing\Exception\RouteNotFoundException: Route ...
0
votes
0answers
12 views

How to use og_is_member() to create REST API?

I have created a View for Services. Everything is working but I am not sure How to check if user is a member or not? Do I need to use og_is_member() or there is any other way to check ?
0
votes
1answer
12 views

JSON through Services View- Authenticating through Parameters when accessing JSON through external app

My Drupal site is generating JSON through Views. I am using Services for that. It is something like this:- http://www.asite.com/api/views/all-date.json Now the problem is that I want to restrict ...
0
votes
1answer
37 views

Making all REST Server calls to Drupal site as an authenticated user through Services

I am making REST Service calls to my Drupal 7 site to either retrieve or create content. Is there a way I can make all these calls through one specific authenticated user? Thanks.
0
votes
1answer
34 views

Headless Drupal for managing multilanguage resources for Web/Android/IOS apps? [closed]

A company has content in 10 languages and 3 channels (web, ios, android). It creates a lot of overhead related to translation (external translation company has to be managed, translations sent etc.). ...
1
vote
1answer
16 views

Add a new role using the Drupal Services Rest api

I'm trying to create a new role using the drupal services module. I am able to update a user with an already created role but can't find a way to add a new role. I'd rather not build a custom service ...
0
votes
0answers
15 views

How to edit/delete a node through Rest endpoint using Oauth authentication?

Here is what I have tried so far, using Oauth I am able to - Retrieve an existing node; endpoint - rest/example/node/40.json, GET Create a new node; endpoint - rest/example/node, $node_data, POST ...
1
vote
0answers
18 views

Rest Export: Get rid of no result fields

I have a rest export that exports various content types. However I am running into the problem of the export giving me empty no result attributes. Here is an example. { "title": "Acme Porter ...
0
votes
1answer
102 views

Drupal 8 RESTful POST 400 Bad Request

I'm trying to use the RESTful service for creating a node with Javascript using the script below, but I only receive a 400 (Bad Request) error. I have enabled all the formats and set permissions for ...
0
votes
0answers
68 views

Wrap 'full html' output with CDATA in Service view in drupal 7?

I'm using Services and Services Views modules. I have created service display view which includes body field(full html type). In the output url view source body is rendering with &lt;p&gt; ...
1
vote
0answers
12 views

Determining permissions issues for REST APIs

Is there a way to determine what permission/s has caused an REST end point in Drupal 8 to throw a 403? This would really help when trying to debug my API.