Still chipping away on this problem. I started playing around with the Enketo API via the terminal to see if I could see something useful. A form “test” was uploaded to Kobocat in order to troubleshoot.
Using the “ENKETO_API_TOKEN” set in envfile.local.txt produces the following:
$ curl --user abc: “http://192.168.1.104:8005/api/v1/survey/preview?server_url=http://192.168.1.104:8001&form_id=test”
{
"preview_url": "http://192.168.1.104:8005/preview/::YYY8",
"code": 200
``
Using the “ENKETO_API_TOKEN” and previewing for superuser kobo produces the following:
$ curl --user abc: “http://192.168.1.104:8005/api/v1/survey/preview?server_url=http://192.168.1.104:8001/kobo&form_id=test”
{
"message": "Survey not found",
"code": 404
``
Using kobo’s api-token (found by: http://192.168.1.104:8001/kobo/api-token) and previewing produces the following:
$ curl --user ceb39a81a93b6d4d7a2f558e89ae7d4f98f9e5e: “http://192.168.1.104:8005/api/v1/survey/preview?server_url=http://192.168.1.104:8001/kobo&form_id=test”
{
"code": 401,
"message": "Not Allowed. Invalid API key."
``
To my untrained eye, it looks like there’s a permission problem that’s preventing KPI, Kobocat, and Enketo from interacting correctly when a user is involved. This renders the local Docker Kobo Toolbox instance nearly useless.
What am I missing here? It can’t be this hard to get a local Docker instance working. The whole point of Docker is to mitigate configuration/dependency problems.
Jake