I work with version 2.62 of the Limesurvey. I would like to manage my survey with a small Java program. I use jdk1.8.0_91 and RemoteControl with json.
post.setEntity( new StringEntity("{\"method\": \"activate_tokens\", \"params\":[\""+sessionKey+"\", \""+surveyid+"\", \""+attarray+"\" ],\"id\":1}"));
Result {"id":1,"result":{"status":"OK"},"error":null}
Hashtable<String, String> participantData2 = new Hashtable<String, String>();
participantData2.put("email","eva.musterfrau@web.de");
participantData2.put("lastname","Musterfrau");
participantData2.put("firstname","Eva");
participantData2.put("token", "zgaTDnMSvcJI31V");
participantData2.put("language", "de");
participantData2.put("emailstatus","OK");
Boolean createToken = false;
post.setEntity( new StringEntity("{\"method\": \"add_participants\", \"params\":[\""+sessionKey+"\", \""+surveyid+"\", \""+participantData2+"\","+createToken+"],\"id\":2}"));
Result {"id":2,"result":"{email=eva.musterfrau@web.de, token=zgaTDnMSvcJI31V, lastname=Musterfrau, firstname=Eva, emailstatus=OK, language=de}","error":null}
post.setEntity( new StringEntity("{\"method\": \"release_session_key\", \"params\":[\""+sessionKey+"\"], \"id\": 99}"));
Result {"id":99,"result":"OK","error":null}
The participant list was activated, but no participant is created. I can’t find the cause.
Best regards Cornelia
The topic has been locked.