- Posts: 12
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
API export_responses not working with parameter $sCompletionStatus
- datamunger
- Topic Author
- Offline
- New Member
Less
More
5 years 5 months ago #177342
by datamunger
API export_responses not working with parameter $sCompletionStatus was created by datamunger
I've been using the API to import responses into python with good success, but there seems to be a problem when using the parameter $sCompletionStatus.
This is my python code:
it gives me this result:
If I remove the sCompletionStatus parameter, everything works fine.
Any help would be appreciated.
This is my python code:
Code:
method = "export_responses" params = OrderedDict([ ("sSessionKey", api.session_key), ("iSurveyID", 977955), ("sDocumentType", 'json'), ("sCompletionStatus", 'complete'), ]) result64 = api.query(method=method, params=params)
it gives me this result:
Code:
{'status': 'Language code not found for this survey.'}
If I remove the sCompletionStatus parameter, everything works fine.
Any help would be appreciated.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
5 years 5 months ago #177351
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic API export_responses not working with parameter $sCompletionStatus
Did you try :
Since we use ordered params
Code:
params = OrderedDict([ ("sSessionKey", api.session_key), ("iSurveyID", 977955), ("sDocumentType", 'json'), ("sLanguageCode", ''), ("sCompletionStatus", 'complete'), ])
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- datamunger
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
5 years 4 months ago #177405
by datamunger
Replied by datamunger on topic API export_responses not working with parameter $sCompletionStatus
This was the answer, I had them in the wrong order! Thank you so much.
The topic has been locked.