Unable to connect to power bi using API

Dears,

Kindly note that I have an old power bi report and this report was connected through API and it was working fine.

now it is not working and it gives me the below error message

Details: “Web.Contents failed to get contents from ‘https://kobocat.unhcr.org/api/v1/data/21609.csv’ (404): Not Found”

thank you for your kind support

Welcome back to the community, @alhassou! Maybe you could follow this post discussed previously (which should solve your issue):

Thank you very much.
I noticed in the mentioned post that is related to connecting between kobo and excel.
But my issue is I am unable to connect between Power bi and kobo using API.
Noting that my colleague can connect using the same API, but I can’t.

can you help?

@alhassou, it uses the same API. Would you mind giving it a try?

No worries. please go ahead.

1 Like

Do you have any update??

@alhassou, you should be able to use the same API to connect your server data to both Excel Power Query and the Power BI.

Sorry I am not able to connect, while my colleague who is using the same API is able.
if I make the form accessible by anyone “Anyone can view submissions made to this form”, then I can connect to the API successfully.
but this brings the data as labels and this not working for me.

Could you share with me the API you are testing to connect your KoboToolbox data with Power BI?

https://kobocat.unhcr.org/api/v1/data/21609.csv

@alhassou, seems like you missed this post:

The API has now changed. It should be something as follows:

https://kf.kobotoolbox.org/api/v2/assets/a9aCgg3mE9JjcziiYddMtX/export-settings/

Can you help me in converting the link
https://kobocat.unhcr.org/api/v1/data/21609.csv

to the new format??

Could you also share with us your project URL? We will be needing this to get the {asset_uid} to fit into the API.

https://enketo.unhcr.org/x/xLFNnJvM

here you go…

@alhassou, this is the Enketo link. You will need to share the project link for this.

https://kobo.unhcr.org/#/forms/a28TCLQaCe3CuURP7Q6EQx/summary

Copy this API and then paste it into a new tab of the same browser where you opened your KoboToolbox account.

https://kobo.unhcr.org/api/v2/assets/a28TCLQaCe3CuURP7Q6EQx/export-settings/

You should get a page something similar to as shown in the image 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. Then use the same URL to connect it to your Power BI.

For details, please see this post: