Questions tagged [8]
Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.
15,791
questions
2
votes
2
answers
1k
views
drupal 7 + services 3 - inserting nodes with select fields
I'm using Drupal 7 + Services 3 to create nodes with POST and JSON. Everything works fine, except field types of select - entity reference select or plain text.
The entity reference uses the ...
3
votes
2
answers
13k
views
Views JSON output
Can anyone tell me how I can get plain JSON output with no surrounding HTML?
I am using the Views and Views JSON modules to get my node data as JSON output.
The problem is my JSON output still comes ...
1
vote
1
answer
643
views
Services 3 JSON format [null] at end of all result
I am using services module recently i have noticed that i am getting all responses along with [NULL] at the end. So my app dev team is unable to parse the JSON.
What i am doing wrong ? What may be ...
2
votes
1
answer
116
views
Content types accessible to a role
I have a requirement to return a list of content types accessible to a user in JSON format using services module.
I have followed this approach:
Used Content Access Control module to set the ...
5
votes
2
answers
2k
views
Create a route for AJAX requests
How should I implement a callback to a single Drupal class (in my case it's Transliteration). I don't need a full Drupal load/bootstrap, but one independent class.
The purpose of the AJAX code would ...
0
votes
2
answers
1k
views
How do I download a JPG file from the server?
I have written a custom module in which i have a download button like given below.
$form['topics_info_graph']['download_graph'] = array(
'#type' => 'button',
'#value' => t('Download Graph'),...
2
votes
0
answers
508
views
using facebook oauth with Rest Server
I'm building an Android app that communicates with Drupal Services 3 through Rest Server module.
On Drupal side, I'm using Facebook oAuth module for authentication.
so I want to let the app users ...
9
votes
1
answer
852
views
How can I install composer packages with drush make?
How does one include composer package in a drush make file?
The more general answer, the better. There's already a composer drush module allowing drush dl to handle composer packages, but that ...
3
votes
1
answer
854
views
Using oauth_common in a module to authenticate with a web service?
I'm wanting to use my Drupal 7 site to communicate with an external API that must be authenticated via 3-legged OAuth.
It seems there's a lot of documentation around about using Drupal as the OAuth ...
5
votes
2
answers
3k
views
Services module: What is 'Index' operation?
D7 / Services 3.2
retrieve / create / update / delete are very straightforward, make senses to me that matching 'CRUD', I don't understand what 'index' here does?
Thanks.
8
votes
1
answer
1k
views
Drupal Services OAuth
I have been working on this issue for a couple weeks now, and I can't find a solution for the life of me. The fact that I have found no decent documentation (on Drupal's website, or anywhere else) is ...
3
votes
1
answer
382
views
Is there advantage to using Drupal.settings, as opposed to directly passing json-encoded var to javascript function
Inside my custom views template, views-view-myview.tpl.php, I have a variable ("$myvar"), which I need to pass to a custom javascript function. Here is how I am currently doing it:
A. json-encode $...
3
votes
1
answer
3k
views
Getting the entire index of nodes from REST API
I'm looking for a way to get all the nodes to be shown on my REST service.
When I query the endpoint index http://server/api/node it only returns 20 results. Are there any additional parameters I can ...
5
votes
4
answers
2k
views
Services 3: Setting taxonomy terms on node creation/update
For a custom node type, I have defined a field that is to hold an unlimited number of values from a taxonomy vocabulary that I defined.
This is what it looks like:
[field_taxonomy] => Array
( [...
4
votes
1
answer
467
views
Failure getting nodes from terms via the rest api
I have added a REST web service in Drupal and all content is tagged with taxonomy. I'm now trying to acquire all related nodes to the terms.
First I'm calling taxonomy_vocabulary/getTree along with ...
1
vote
1
answer
161
views
Creating SearchAPI searches without using Views
I am using SearchAPI on a website with 20,000 entities indexed. Searching through them with SearchAPI is pretty simple. Its fast. I want to keep it as fast as possible with very low overhead, without ...
2
votes
0
answers
122
views
REST/Services: Only able to retrieve index. Everything else result in http error 500
I am pretty new to Drupal, and I'm trying to get a webservice running on my Drupal 7 site.
For testing purposes, I made a Rest-service, with NO authentication, and all resource's added to it. I ...
1
vote
1
answer
948
views
How can I use REST API to create a node with status/tags/data
Follow the Services module document, I can only create nodes using REST API with type, title and body. But I am not able to create nodes with more parameters such as tags, status and date.
Need help.
-4
votes
1
answer
3k
views
Do we really need Blog module in Drupal 7 (and 8)? [closed]
In Drupal 7, the Blog module do not have any option to change the URL. Because I want a different URL, I build blogs without the Blog module. For blog pages, I make it using Views and theme ...
0
votes
1
answer
246
views
What will be the post parameter when specifying vocabulary term?
I am trying to create a drupal node with a iphone app via rest server. I want to send the request to drupal as json.
I have added a taxonomy vocabulary for categorizing the nodes. Specifying a ...
3
votes
1
answer
4k
views
Getting views data as a REST service
I need a way to get the output of a view as a REST service in JSON format.
I read about the RestfulWS and the Services modules, but I didn't find enough documentation.
Are these straight forward, or ...
7
votes
2
answers
3k
views
drupal HTTP POST data
How do i send HTTP POST/GET data to drupal?
for example:
I've got a html form:
<form action="mydrupalcite.com" method="get">
<input type="text" name="title" />
</form>
how do ...
2
votes
1
answer
2k
views
Drupal7 REST webservices API KEY vs OAUTH two-legged authentication for clientside JS consumer library
I'm working on an Drupal7 API, using REST services, and consumer JS library (no server code). I'm not trying to authenticate/authorize the end-users, only to identify and allow access to the '...
3
votes
2
answers
1k
views
Getting Parse Error during installation of Drupal 8
I am getting the following error while Installing Drupal 8.
Parse error: parse error, expecting T_CONSTANT_ENCAPSED_STRING' or'('' in var\www\html\core\includes\bootstrap.inc on line 3
When I ...
1
vote
1
answer
2k
views
JSONP requests not working in REST server
This is related to a bug report I filed just moments ago. If there's someone who has successfully used the REST server in the Services module with JSONP requests (cross-domain), I'd be happy to hear ...
3
votes
3
answers
999
views
Receiving XML Posted data
I have a question about what would be the best way for a module to accept a posted XML file via a web service. What I am trying to do is receive the file, read through the contents of the file, and ...
4
votes
1
answer
1k
views
Why does drupal_http_request return a 400?
I am having issues sending a POST via my module.
In my browser's REST client I get a 200 with
POST https://mydomain.com
username=myuser&password=password1
So I know that the service is working ...
0
votes
1
answer
199
views
cache a rest server index request
I created one custom module for rest server, i created own resources and i want to be able to cache index request, for return a 304 with using http request if - headers.
I cannot find information on ...
5
votes
1
answer
108
views
Is there a firm or preliminary decision on which modules will leave Core for 8?
I seem to recall I've seen a more than one discussion about breaking out certain less than maintained modules from Core. They would presumably be moved to contrib instead. Currently I can't find any ...
5
votes
1
answer
2k
views
How can I PUT a new file to a node using services 3 without overwriting the existing file?
Using Services 3 I have it working fine to add a file using
endpoint/file
{"uid":"1","filesize":"99999","filename":"whatever.bin","file":"BASE64_ENCODED_DATA"}
and also to add a node with that file ...
3
votes
2
answers
1k
views
Using REST API for data storage for user definable content
I might be barking up the wrong tree completely however I am trying to achieve the following.
Drupal 7.
Custom REST web service which can hold user definable content types.
These pieces of content ...
1
vote
0
answers
94
views
How to best store and expose external route based location data for use in views/charts/openlayers?
I have a large amount of different route data (hundreds of thousands of different location pairs per week and some accompanying data for each pair such as datetime, speed, direction) that I am parsing ...
2
votes
3
answers
621
views
drupal 7 restful server VS seperate Restful server to access mysql. Can a restful server be on a subdomain
I am trying to figure out which would be easier to setup and maintain, while keeping the speed average or better.
I have setup a Drupal 7 site on godaddy with their Deluxe 4GH hosting plan. What I ...
2
votes
0
answers
115
views
REST server or other way to do a password reminder
I see in the services 3 module that there is not a password reminder functionality yet although it has been discussed. What I want to know is whether there is any other way that I can call for the ...
0
votes
1
answer
720
views
Populating file fields with an http-request with the Services module and a REST Server (Drupal 7)
I need to add content trough a node.create and one of the fields in the content type I am adding is a file field. So far I have been able to get my Services module set up with REST server to accept ...
0
votes
1
answer
5k
views
Trouble with session ID and Drupal cookies when trying to establish a connection with Service Module and http-post
I am trying to complete an http-post between my common lisp application and my Drupal Site running Services and a Rest server. Currently I have my rest server set up to accept user login, and using ...
1
vote
1
answer
937
views
Add Object in json file generate by services module drupal
I need some help about this problem. I need to add object that encompasses the hash of my json file.
I use services module in drupal 6 for generate xml and json file from my nodes.
So, when i view my ...
0
votes
3
answers
201
views
How to execute custom code on user signup
I need to do a REST request every time a new user signs up.
The REST request returns some data that I need to store for the Drupal user account, and be able to present as content somewhere.
What is ...
4
votes
1
answer
2k
views
How does the service module work?
i am using drupal 6 and services 6.3x module but i am unable to use this module completely.
I have enabled rest server module also.
I added a new service and added resources to it.
I added node ...
20
votes
3
answers
4k
views
Which contributed modules are being moved into Drupal 8 core?
There were a significant number of D6 modules (or versions of) that were pulled into D7 core. I am wondering if there are any for D8?
1
vote
1
answer
6k
views
Simple REST request to create nodes
I'm having the following issue trying to create nodes from Drupal 7 to a Drupal 6 install. The target Drupal site is running Services 3.x.
Here's my code:
$base_url = $params['path'];
$data = array(...