KoboToolBox and PowerBI error 500

Dear,

before two days I finally managed to implement the connections with PowerBI … with an anonymous authentication direct access to data…Then I saw the data in Power Bi and i was able to work with them.

But after a little hour of working i get an POWER BI error "Web contents failed to get contents from the url - (500) Internal Error"

When i tried the same in the browser … enter the url http://kc.dock.xxx:8585/api/v1/data/9 … i get a

### 500 Error

If this is a significant error that needs to be fixed, please send a support request to support@kobotoolbox.org with information about what triggered this error.

Everything else works fine…
And when i made a restart works fine again for a few hours of working… It’s not depends on the time but it depends on the work i’m trying to do.

Any ideas?

Panos

Hi @ppapadatosgr,

I don’t know if it can fix your issue but you should use the KPI API instead of KC.
You can find it at http://kf.dock.xxx:8585/api/v2/assets/

1 Like

Thanks for your time…

I’m waiting that when i enter in brower url the following http://kf.dock.xxx:8585/api/v2/assets/adRrStfMF7MjAsGUhd8ne2/
http://kf.dock.xxx:8585/api/v2/assets/adRrStfMF7MjAsGUhd8ne2/data/
it will returns me the data but i get the following error

Not Found

The requested URL /api/v2/assets/adRrStfMF7MjAsGUhd8ne2/ was not found on this server.

Something wrong or something not enabled ?

Thanks again
Panos

Maybe because my installation is on my OWN Server ??

Just to be sure, Does http://kf.dock.xxx:8585/api/v2/assets/adRrStfMF7MjAsGUhd8ne2/ respond with an authenticated user?

If yes, and you get a 404 on http://kf.dock.xxx:8585/api/v2/assets/adRrStfMF7MjAsGUhd8ne2/ when accessing with anonymous user, you probably have not checked “Share by link” and “Share data publicly”. (Found in the Sharing modal window)

Screen Shot 2020-03-23 at 09.32.30

1 Like

I have checked both Share by link and Share data publicly as you can see in photo…
From the link i get the hash of the form (is that correct) ?

and in the same photo you can see that the form can be accessed by two users super_admin and another one …

how i will be sure that api/v2 working in my server ?

It’s correct.
With your other user logged in, can you access http://kf.dock.xxx:8585/api/v2/assets/adRrStfMF7MjAsGUhd8ne2/?

No … no one can access …the link… every time i get a NOT FOUND error

To test it open the application and login it redirects me to http://kf.dock.xxxxx:8585/#/forms … after that i open another tab in the browser and paste the link …
http://kf.dock.xxx:8585/api/v2/assets/adRrStfMF7MjAsGUhd8ne2/

The error is NOT FOUND and not CANNOT ACCESS !!!

Panos

@ppapadatosgr. My apologies.
Latest release of master does not contain new version (v2) of KPI API.

In that case, you should try: http://kf.dock.xxx:8585/assets/adRrStfMF7MjAsGUhd8ne2/

Once again, sorry about the confusion.

1 Like

OK that’s works but i want to read the records (from power bi or other apps) and not the format of the form…??

Panos

From this endpoint:
http://kf.dock.xxx:8585/assets/adRrStfMF7MjAsGUhd8ne2/submissions/

1 Like

Hello again,

… as you predict it works… I hope that everything will work just fine after some time also … (after multiple calls of the submissions from POWER BI)

Finally i do manage with the use of KoBo Power BI Connector v2.pbix and the URL of the submitted data http://kf.dock.xxx:8585/assets/adRrStfMF7MjAsGUhd8ne2/submissions/ to access in JSON only format the submitted records…

I found how to covert json records in table records with POWER BI and all works just fine… and in real time. .

Thank you very much for your help

Regards
Panos

1 Like

@ppapadatosgr,
You’re welcome. I hope it can resolve your issue on a long term.
Let us know if it does not.

1 Like

6 posts were split to a new topic: How do i pull my data in power bi?

As i describe earlier in my posts do not use kc…
does not work…

Instead find and use api services from kf.
As in my example find your form in httpp://kf.dock.xxx:8585/assets/

And after that use the relative link for your submissions
http://kf.dock.xxx:8585/assets/adRrStfMF7MjAsGUhd8ne2/submissions/

Of course you have give permissions to users first…

Best regards
Panos

@ppapadatosgr,
We found an issue (https://github.com/kobotoolbox/kobocat/pull/613) in KC which may affect you. We’ve released a new version that fixes this.

Please try with latest version and use https://kf.domain.tld/api/v2/assets/{asset_uid}/data/ (as I said earlier).

2 Likes