Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

list_participants api function is broken after upgrade from 3.27.7 to 5.0.8

  • SaschaKiss
  • SaschaKiss's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 9 months ago #218178 by SaschaKiss
I have a bunch of surveys all enriched with custom attributes. With LimeSurvey 3.27.7 and below I was able to filter participants according to the custom attributes by setting up a call like this:

request: {
url: 'https://mylimesurveyinstance/index.php/admin/remotecontrol',
headers: { 'content-type': 'application/json' },
method: 'POST',
timeout: 5000,
data: {
method: 'list_participants',
params: [
'sessionkey',
345367,
0,
2739,
true,
[ 'token', 'completed', 'attribute_1', 'attribute_2' ],
{ attribute_2: 357 }
],
id: 1
}
}

This query returns all participant tokens with attribute_2 = 357.

Now after upgrade to version 5, this query does not filter any more, the exact same call returns all tokens.

I have seen that you now allow some more difficult queries but even the new syntax doesn't work for me and returns "No survey participant found" if I set up a call like this

request: {
url: 'https://mylimesurveyinstance/index.php/admin/remotecontrol',
headers: { 'content-type': 'application/json' },
method: 'POST',
timeout: 5000,
data: {
method: 'list_participants',
params: [
'sessionkey',
345367,
0,
2739,
true,
[ 'token', 'completed', 'attribute_1', 'attribute_2' ],
{ attribute_2: [ '=', 357 ] }
],
id: 1
}
}

My background processes rely on this to work, so currently I cannot upgrade my production environment to 5.0.8 because of this issue.

Any help appreciated
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose