Data Not showing in column

1. What is the issue? Please be detailed.

i am using api https://urlcomp/v1/projects/1/forms/GVM1.1/submissions.csv
to get all submission of form in csv. I am able to download it successfully and total number of records also matching submitted date also matching but all form column data coming blank only submitted date and some few extra things coming all other things is bank.
But when i download it from web app of odk central in csv form data is coming in that. and number of records also same.
Why i am only getting submission info no info of my form data filled by user in api download.

2. What steps can we take to reproduce this issue?
Authenticate my session first then hit api https://urlcomp/v1/projects/1/forms/GVM1.1/submissions.csv

3. What have you tried to fix the issue?
I tried some other json dataset api table wise in those also only smae info coming no form data

4. Upload any forms or screenshots you can share publicly below.

Hi @Rohit_Singh_Rawat,

Welcome to the ODK community! Please take a moment to introduce yourself. Thanks for uploading a photo of yourself as an avatar, it helps build community!

You may have gotten your answer already from other forum comments, but here is some more information anyway for you or anyone who finds this later.

You're not seeing your data because your project is encrypted. (The "not decrypted" is a clue and I can get a similar CSV when I use the API to download a the submission CSV of one of my own encrypted projects without doing anything to decrypt the data.)

You'll need to use a POST request and provide a keyId and passphrase to be able to download the decrypted CSV. The documentation could be clearer and list this this in the parameters... it has some info in the description and references another part of the documentation.

I'm using pyODK and my request looks like:

client.post('/projects/<project id>/forms/<my form>/submissions.csv', json = {'<key id>': '<my passphrase>'})

I knew the passphrase from when I set up encryption. I found the keyId by looking it up on the project details (documentation). In this case, my projectId is 1 and the keyId of that projects happens to be 1.

client.get('/projects/1')
{'id': 1,
 'name': 'Encrypted test project',
 'description': None,
 'archived': None,
 'keyId': 1,
 'createdAt': '2023-12-08T23:53:05.217Z',
 'updatedAt': '2023-12-08T23:53:38.645Z',
 'deletedAt': None}

So the data I actually included in the POST body (to the same submissions.csv endpoint) was was {'1': 'mysecretpassphrase'}.

And then I was able to download the full contents of my submissions!

1 Like

Thanks ..it's already solved