API Export to Excel Drops Hyperlinks to Photos

Hi - I followed excel power query instructions to push data to excel. It works well, except hyperlinks to photos are not included - only a number reference in the form 12385875.jpg.

How can I push the entire hyperlink to excel through the API?

If I export as an XLS file within Kobo (rather than pushing through the API), then the full working hyperlink appears.

Many thanks.

Hi @mark_ej, including media links in the export are only in the new v2 synchronous export method that is in the latest update. You can see an example of its usage here (the documentation is still to be updated):

1 Like

Hi @Josh, thanks for your response. I realise the documentation isn’t updated yet, but I am not able to follow the solution parsed as it is. Would you be able to list the steps I need to take to implement the push of the full hyperlink? Many thanks, Mark

@mark_ej, we will be updating our support document very soon. Till then, maybe you could follow the steps outlined below:

Step 1:

Open your survey project and then make some downloads (by specifying a name to the Save selection as ...) as shown in the image below:

image

Step 2:

Now in a new tab, use the following API:

https://[kpi]/api/v2/assets/{asset_uid}/export-settings/

Here,

kpi refers to kobo.humanitarianresponse.info if you are using the humanitarian server else kf.kobotoolbox.org if you are using the non-humanitarian server.

asset_uid refers to a9aCgg3mE9JjcziiYddMtX if you are at https://kf.kobotoolbox.org/#/forms/a9aCgg3mE9JjcziiYddMtX/summary.

So, the API should be https://kf.kobotoolbox.org/api/v2/assets/a9aCgg3mE9JjcziiYddMtX/export-settings/

You will need to paste this API to a new tab under the same browser where you have opened your KoboToolbox account.

Step 3:

Now, you should see a screen as shown below:

Copy the URL from data_url_csv or data_url_xlsx upon your preference. It’s, however, advised to choose the latter one if you have data from repeat groups in your project.

Step 4:

Go back to your account and then make your data public by checking Anyone can view this form and Anyone can view submissions made to this form that is located under SETTINGS>Sharing as shown in the image below:

image

You could then follow the rest from the existing support article.

1 Like

Hi

I have not fully grasped the essence of the steps suggested here, but before I dig deeper I would like to know: Is it still a condition for accessing images dynamically that all data of the project need to be made public? No “token approach” like for the json downloads?