I'm trying to get a filtered list of participants by passing some conditions in the list_participants request ($aConditions)
I've tried everyway I can imagine to format the JSON for the $aConditions parameter, and I keep yielding results that do not match the passed conditions. I'm working in a somewhat limited development environment, so I can't really tell what is happening on the server side to determine what could possibly be going wrong. I can only share what is being sent in the body, and then what is being returned in response
Code:
{
"method": "list_participants",
"params": {
"sSessionKey": "XXXXXXXXXX",
"iSurveyID": XXXXX,
"iStart": 0,
"iLimit": 20,
"bUnused": false,
"aAttributes": ["completed"],
"aConditions": {
"completed": "N"
}
},
"id": 1
}
Then, what gets returned is:
Code:
{
"id": 1,
"result": [{
"tid": "49",
"token": "XXXXXX",
"participant_info": {
"firstname": "XXXXXX",
"lastname": "XXXXXX",
"email": "XXXXXX"
},
"completed": "N"
}, {
"tid": "48",
"token": "XXXXXX",
"participant_info": {
"firstname": "XXXXXX",
"lastname": "XXXXXX",
"email": "XXXXXXX"
},
"completed": "2014-08-12 12:09"
}, {
"tid": "38",
"token": "XXXXXX",
"participant_info": {
"firstname": "XXXXXX",
"lastname": "XXXXXX",
"email": "XXXXXX"
},
"completed": "N"
}, {
"tid": "37",
"token": "XXXXXX",
"participant_info": {
"firstname": "XXXXXX",
"lastname": "XXXXXX",
"email": "XXXXXX"
},
"completed": "N"
}, {
"tid": "35",
"token": "XXXXXX",
"participant_info": {
"firstname": "XXXXX",
"lastname": "XXXXXX",
"email": "XXXXXX"
},
"completed": "2014-07-21 22:52"
}, ],
"error": null
}
As you can see - records that have dates ( and not just "N") are still being received. I have exhausted all my ideas about what/where I could be going wrong. The request appears to work otherwise. But that parameter has me completely stopped.
Can anybody help?