Problem in Accessing API

Earlier i was accessing API through Ajax and it was working properly. Dont know suddenly what changes have been made to the API my Ajax call for API are not working.
$.ajax({
type: ‘GET’,
url: ‘https://kc.kobotoolbox.org/api/v1/data/511840?format=jsonp’,
headers: {
‘Authorization’: 'Basic ’ + btoa(userName + “:” + password)
},
dataType: ‘jsonp’,
})
It is giving me Failed to load resource 404. Infact accessing the API directly is giving me the json data. Also i tried to load the data in Excel as per the documentation shown for Pulling Data Into Excel Power Query. It is also giving me the same error - Web.Contents failed to get contents from ‘https://kc.kobotoolbox.org/api/v1/data/511840.xls’ (404): NOT FOUND"
Is there some changes done in the API because my same program was working fine earlier.
It would be a great help if you could solved this soon.

Would you mind trying the same making your data public. It should work!

Have already made the data public. But not working

It should be working with Excel Power Query.

It was working earlier but now it is giving this error. Web.Contents failed to get contents from ‘https://kc.kobotoolbox.org/api/v1/data/511840.xls’ (404): NOT FOUND"

Hi @khasaab
We have noted the same issue on our side and we should be able to advise when our developers solve the problem.

Stephane

1 Like

OK, but still by when can we expect the issue to be resolved.

Hi,
Could you try something on your end so that we ascertain one thing? Kindly remove the public availability of your project and put it back again to see if this resolves your problem.

Stephane

1 Like

Tried many things from last 3 days, but unable to access from ajax or XHR. Also it is not only for one Project but all the Projects. It was working fine since last week, something has happened or changed in the Kobo API dont know what. When we directly try to load url in the browser its fine. In fact also unable to load the Excel Data in the power Query. 404 Error.

Hi @khasaab,

It should be working now! Could you kindly confirm! I just tested the same at my end and was able to pull the data in the Excel. If you should still have issues, kindly please share with us the following (through a private message):

  • Username
  • Project name

Note: Kindly please make your data public so that you are able to pull it in Excel.

FYI, i just made a dummy try at my end and it worked fine for me:

1 Like

Here is the data that i have pulled in an Excel for the project Xtreme:

Try it at your end and you should also be able to get it in Excel. I have shared the URL to you through a private message!

Dont know its working now, but earlier it was not. Also the Ajax request is started to work with the same code. Has something being updated in the API or not, dont know. Any way thanks for the revert and solution.

1 Like