How to make an api request for editing a submitted instance

I could be overlooking something, but I don’t think we have a great way to do this. A quick and dirty way to prompt for credentials and then redirect to another KoBo endpoint is to use https://kobo.humanitarianresponse.info/accounts/login/?next=[destination], where [destination] in your case would be /api/v2/assets/akj5HssCp67JRVMV9PqVp6/data/119085042/edit/?return_url=false:

https://kobo.humanitarianresponse.info/accounts/login/?next=/api/v2/assets/akj5HssCp67JRVMV9PqVp6/data/119085042/edit/?return_url=false

This does “work” in the sense that it prompts for a username/password and then, if you have permission, shows you the one-time-use Enketo link for editing that submission in a JSON response. In Firefox, it’s not so bad, because it has a built-in, fancy JSON renderer that turns URLs into hyperlinks. In other browsers, your users would probably have to copy and paste a URL into the address bar :slightly_frowning_face:

3 Likes