Query the hosted LimeSurvey sql database

Plus d'informations
il y a 10 mois 4 semaines - il y a 10 mois 4 semaines #184176 par Jjamison0221
I purchased the Hosted Enterprise Professional Package and would like to query the database using php. Would love help in finding out how to connect. My support tickets and phone calls to my initial contact have been ignored for the last 30 days.

Connecting to a hosted database to query seems like a fairly easy piece of info...maybe the good people on this forum know the answer?

Thanks.
Dernière édition: il y a 10 mois 4 semaines par Jjamison0221.

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 10 mois 4 semaines #184177 par holch
Have a look at the Limesurvey API.

However, I you should insist on a return on your phone calls and tickets, if you have the Hosted Enterprise Professional Package.

Here in the forum most of us have nothing to do with Limesurey GmbH and are volunteers giving support for the open source application. We have no insights on the SaaS service provided by the Limesurvey GmbH.

Send them an email. Maybe that helps.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Les utilisateur(s) suivant ont remercié: DenisChenu

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 4 semaines #184179 par Jjamison0221
Thank you

At least you offered something in response. I'll dig into API and see if I can find a solution. I didn't want to bother the forum (knowing that everyone here is doing it out of the kindness) - but I'm desperate in a way and thought I might get lucky.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 4 semaines #184181 par holch
Well, 30 days with no response to a support ticket and not answering calls is not acceptable in my opinion. I don't know how they usually work, but I don't think that this is a normal response time for them.

So maybe you need to check if you are not doing something wrong.

I am also not aware of a support telephone. I think support works purely via ticket. But usually they respond these tickets in a timely manner.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 4 semaines #184182 par tpartner
@Jjamison0221, what are you trying to do? As holch suggests, it may be possible through the API instead of direct SQL queries.

My guess is that Limesurey GmbH will not let you access the database directly.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 4 semaines #184183 par Jjamison0221
Thanks holch.

I wish it was just a ticket submission issue. But I did just today get a note from my 'handler' and he said he doesn't feel well and will let me know when he feels better and can help.

So no timeline and no solution. The Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. just keeps passing me to him and no one else is jumping in to help.

Don't like complaining, just seems like a simple solution. All I'm trying to do is report out the participation rate on the survey. I have been doing this with ASP-Net, php and javascript since the 90's. I just need access to where the data is being written. - thanks for being an anonymous sounding board. I'll grip no more.

Cheers.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 4 semaines #184184 par Jjamison0221
Tony,

I want to be able to report participation rate by an attribute on the survey. Say for example 10 of 100 males (10%). My attributes are coming from SAML relay into the database, I have the denominator to feed to the equation. I just need access to the data to know in real-time how many have responded.

This is just such a super simple thing to do in every survey I have ever created in any lanugage or on any server or database. I'm just at a loss for words that this isn't part of LimeSurvey already and secondly, that I've paid over $3,000 for a hosted solution and no one will give me the time of day.

I really liked the kid I was working with during initial installation, but now he has gone dark on me.

Not your problem.. but thanks for giving me hope by responding. Not sure I'll get access to the API unless someone at LimeSurvey GmbH responds to my requests.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 4 semaines #184186 par tpartner
You already have access to the API. All you need are admin credentials.

Here is a link to a post describing how to use the API in PHP to get a response by token (I couldn't find any examples of the export_responses() method but it will be similar) - www.limesurvey.org/forum/development/118...urvey-rpc-api#182796

A couple more links...

- manual.limesurvey.org/RemoteControl_2_API

- api.limesurvey.org/classes/remotecontrol...hod_export_responses

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 4 semaines #184188 par Jjamison0221
Thanks Tony,

I'll follow that informative path you set before me. I hope you mean by admin credentials my LimeSurvey Login info - because that will mean I don't have to wait for anyone to get back with me. I'll use what you gave me and see where I get.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 semaines #193998 par christianlangkamp
Did this work in the end ?

I am looking also at a simple way how to maybe extract the data without always going through the exporter.

Ideally I would love to connect the list up to a KNIME instance, being able to just update my analysis dataset and then update the analysis workflow.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 semaines #194005 par Joffm
Hi,
here is an API script to get the entire survey data.
<?php
 
require_once 'jsonrpcphp/JsonRPCClient.php';
 
define( 'LS_BASEURL', 'https://www.example.com/survey');  // adjust this one to your actual LimeSurvey URL
define( 'LS_USER', 'myUserName' );
define( 'LS_PASSWORD', 'myPassword' );
 
// the survey to process
$survey_id=mySurvey_ID;
 
// instantiate a new client
$myJSONRPCClient = new \org\jsonrpcphp\JsonRPCClient( LS_BASEURL.'/index.php/admin/remotecontrol' );
 
// receive session key
$sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );
 
if(is_array($sessionKey))
{
    header("Content-type: application/json");
    echo json_encode($sessionKey);
    die();
}
 
/* Get the responses */
$response = $myJSONRPCClient->export_responses(
    $sessionKey,
    $survey_id,
    'json', // Document type : pdf,csv,xls,doc,json
    null, // Language code : null : default from survey
    'complete', // Stautus complete|incomplete|all
    NULL, // Heading : code|full|abbreviated : question text, default code
    'short', // answer : short|long , default : long
    2,  // First exported SAVEDID   or NULL
    3  // Last exported SAVEDID   or NULL
    ); 
 
$decodedString = base64_decode($response);
$aResponses = json_decode($decodedString, True);
 
// Find the first response ID
$aFirstResponse = reset($aResponses['responses'][0]);
 
echo '<table style="border-collapse: collapse; text-align: left;">';
echo '<tr>';
// Insert column headers
foreach($aFirstResponse as $key => $value) {
	echo '<th style="border: 1px solid #CCC; padding: 2px 7px;">'.$key .'</th>';
}
echo '</tr>';
 
foreach($aResponses['responses'] as $key => $row) {
//echo "Key: ".$key."  Row: ".$row;
	echo '<tr>';
	// Insert the data
	foreach(reset($row) as $key => $item) {
 		echo '<td style="border: 1px solid #CCC; padding: 2px 7px;">'.$item .'</td>';
	}
	echo '</tr>';
				}
echo '</table>';
 
 
 
// release the session key
$myJSONRPCClient->release_session_key( $sessionKey );
 
 
?>

See here:
https://api.limesurvey.org/classes/remotecontrol_handle.html#method_export_responses




Joffm


Or you do it with direct access in php.
It is not to difficult to include a mapping table (SGQA-Codes -> question text)

And it's always better to open a new thread than to continue such an old one.
I am really sure Jjamison0221 is looking into the forum and will not be able to answer your question.


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 semaines #194014 par jelo

Joffm écrit: Or you do it with direct access in php.

The thread is about how to access LimeSurvey instances hosted by LimeSurvey GmbH.
Direct access via PHP would be a big surprise in that context.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 semaines #194015 par Joffm
I am not really sure what christianlangkamp talked about.
He asked in two old threads, this one about a LS hosted installation and the other one about direct querying the database (how to query to replace SGQA codes with question codes).
But he didn't mention where his installation is hosted.
So I answered to more or less both questions in one answer.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 semaines #194018 par christianlangkamp
I am in the hosted Limesurvey one. The commercial package so to speak.

At the moment once a week I go in and download a CSV. That is OK for now, but a bit of a nuisance.

But it would be so much more convenient to be able to just use a SQL Query node in KNIME or so and just click the update button...

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 semaines #194037 par jelo
The RemoteControl API is the way to go at the moment.

1. In the long run: KNIME extension for LimeSurvey
2. Shortcut: Check interfaces of other languages, which might already have a toolchain into KNIME.
LimeSurvey via R: LimeR: github.com/cloudyr/limer
LimeSurvey via Python: Limepy : pypi.org/project/limepy/

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Les utilisateur(s) suivant ont remercié: christianlangkamp

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!