How to get submitted data via API call

How to get submitted data via API call when it is encrypted.

Can anyone help me on this please?

Assuming your data is being sent to Central, the API documentation is at https://docs.getodk.org/central-api/. What have you tried so far with that API?

Thanks Yanokwa,

Yes, the data is in the central server and it is encrypted. We are trying to create an application to pull these data to via API call. As the data is encrypted we are getting only the header information.


. We need to know how to get data via API call when it is encrypted.

See https://docs.getodk.org/central-api-submission-management/#exporting-form-submissions-to-csv to export encrypted form submissions to CSV.

We have followed the instructions described in the documents but are not getting the encrypted data.

When we tried with Postman, we were not getting the decrypted data. In Postman we passed the token, and passphrase and did not get the data. We noticed that before the encryption of the project, the submitted data were available via API. After enabling the encryption of the new submission the data are not getting via API.

We also tried passing the keyId. Are there any additional keys we need to pass to get the data?

Thanks, we got the encrypted data when we passed the content type to the API call.

Encoding.UTF8, "application/x-www-form-urlencoded"

i tried same i am geeting only some fields but when i download csv from web portal of odata central i am getting dtata in all fields

Need to pass phrase and encoding

new StringContent($"{keyId}={passphrase}", Encoding.UTF8, "application/x-www-form-urlencoded");

Is it send in query string and where i get keyid and passphrase

I am getting csv that with exact number if records persent in odk central but data coming blank in columns why

Keyid is form id and passphrase is the key used for crypting the data in ODk central.
When the data is encrypted in ODK central, we get only records as blank and status will shows not decrypted. We need to pass the passphrase for encrypting the data.

1 Like