unhcr / koboloadeR

deprecated please use {kobocruncher} - https://edouard-legoupil.github.io/kobocruncher/
https://unhcr.github.io/koboloadeR/docs/
28 stars 28 forks source link

UNHCR server API #61

Closed manuelbuesser closed 3 years ago

manuelbuesser commented 3 years ago

My plan is to use the koboloadeR package to download datasets stored on UNHCR's KoBo server. I managed without any problems when using KoBo Toolbox and HumanitarianReponse servers. However, I could not get to access any data stored on UNHCR's KoBo server.

I ran the following code unsuccessfully: kobo_datasets(user = "username:password", api = "unhcr")

I also tried with "https://kobo.unhcr.org/api/v1/data" and "https://kobocat.unhcr.org/api/v1/data" as API arguments. None of these options worked. What is the correct API argument for the UNHCR server?

manuelbuesser commented 3 years ago

It appears that it works when using"https://kobocat.unhcr.org/api/v1/data/". Note that the additional "/" is critical for it to work.

Edouard-Legoupil commented 3 years ago

Not sure - does that mean what we shall change: https://github.com/unhcr/koboloadeR/blob/gh-pages/R/kobo_host.R#L35 ?

@manuelbuesser Please let me know

manuelbuesser commented 3 years ago

That could work. Currently, when I enter "unhcr" as API, it does not work for me. It seems to me that rather than "https://kobocat.unhcr.org/api/v1/" it should refer to "https://kobocat.unhcr.org/api/v1/data/".