Enketo-Express and ODK 1.4.4 integration. (Forbidden. This server is not linked with Enketo)

Hi Piqo,

Enketo-Express:

The API response and your Enketo express installation seems fine. If it
doesn't load the form (on url http://192.168.2.140:13131/::YYYp in the
browser), that will be because the form with ID "MY_FORM_NAME" cannot be
reached or maybe it doesn't exist on http://my_aggregate_subdomain.al:8083/ODKAggregate
http://my_aggregate_subdomain.al:8083/ODKAggregate&form_id=MY_FORM_NAME/formList
,
or is protected. In all those cases, you should see a helpful error message
telling you what's wrong when loading the URL in your browser.

ODK Aggregate:

You are definitely an Enketo-Express/Aggregate pioneer (thanks for that).
Make sure you are using the latest version of Enketo-Express and that both
ODK Aggregate and Enketo-express can communicate with each other (in your
case, are on the same local network). I made sure the API of the old Enketo
App and new Enketo App functions in the same way and return the same
responses, so the apps could in theory be swapped without pain.... However,
it seems you've run into an issue caused by some subtle difference in the
responses/communication between the different Enketo apps and Aggregate. I
don't yet know what's going on so I'm posting this here to see if anybody
can help. I'm cross-posting this to the ODK-Dev forum.

An API call to the old Enketo-legacy shows the following Aggegrate (v
1.4.3) log with the correct 200 response and a 46 Byte size from which the
Enketo URL can be extracted:

https://lh6.googleusercontent.com/-tqT6-LbStLA/VI8fXj3w6PI/AAAAAAAAAnM/majouEjMI2g/s1600/Screen%2BShot%2B2014-12-15%2Bat%2B10.28.56%2BAM.png
in the terminal with cURL this response is received:

< HTTP/1.1 200 OK
< Date: Mon, 15 Dec 2014 17:56:04 GMT

  • Server Apache/2.2.22 (Ubuntu) is not blacklisted
    < Server: Apache/2.2.22 (Ubuntu)
    < X-Powered-By: PHP/5.3.10-1ubuntu3.15
    < Set-Cookie: __enketo_a=[removed this]
    <* Content-Length: 67*
    < Content-Type: application/json
    <
    {
    "url": "https://ocxat.enketo.org/webform",
    "code": "200"
  • Connection #0 to host enketo.org left intact
    }

The same API call to an enketo-express server shows the following log, also
with a 200 response* but with a 0 B response* and therefore without an
enketo url to redirect to.

https://lh6.googleusercontent.com/-rdfREZ18hkM/VI8fYExW4bI/AAAAAAAAAnQ/aCc3meuPoDQ/s1600/Screen%2BShot%2B2014-12-15%2Bat%2B10.29.10%2BAM.png

in the terminal with cURL the same API call shows this response (this
response does have a body):

< HTTP/1.1 200 OK

  • Server nginx/1.4.6 (Ubuntu) is not blacklisted
    < Server: nginx/1.4.6 (Ubuntu)
    < Date: Mon, 15 Dec 2014 17:54:42 GMT
    < Content-Type: application/json; charset=utf-8
    < Content-Length: 54
    < Connection: keep-alive
    < X-Powered-By: Express
    < Vary: Accept-Encoding
    <
    {
    "url": "http://enk.to/::YYYH",
    "code": 200
  • Connection #0 to host enk.to left intact
    }

Any ideas, anybody?

Cheers,
Martijn

ยทยทยท On Monday, December 15, 2014 9:19:12 AM UTC-7, El Piqo wrote: > > Hi Martijn, > the: > *curl --user MY_API: -d > "server_url=http://my_aggregate_subdomain.al:8083/ODKAggregate&form_id=MY_FORM_NAME > " > http://192.168.2.140:13131/api/v1/Survey > * > > returns a: > *{* > * "url": "http://192.168.2.140:13131/::YYYp > ",* > * "code": 200* > *}* > > I dont get what ::YYYP is, but does this mean that from enketo-express > side everything is working properly? From ODK when I click on Enketo > Webform nothing happens. (posting Headers below) > Should I investigate the issue with ODK guys? BTW, has this been tried > before? because I get the feeling I'm the first to try to connect these two > (ODK 1.4.4 <-> Enketo-Express). Or perhaps just bad luck. :) > > > *HEADERS on POST from ODK 1.4.4:* > *-------------------------------* > *Remote Address:192.168.2.140:8083 * > *Request > URL:http://my_aggregate_subdomain.com:8083/ODKAggregate/enk/enketoApiHandler > * > Request Method:POST > Status Code:200 OK > > Request Headers > Accept:*/* > Accept-Encoding:gzip, deflate > Accept-Language:en-US,en;q=0.8,sq;q=0.6 > Authorization:Digest username="odk_username", realm="ODK 1.4.4 Aggregate", > nonce="MTQxODY1ODU3MjczMTplNjBjMmVjOWM5ZmfIwZjNjMjYzMTZkMDZmZTI2NDIyOQ==", > uri="/ODKAggregate/enk/enketoApiHandler", > response="ce8c169bb06c3dfcbfb466cb4sfbd280d0", qop=auth, nc=000001c7, > cnonce="78adddd3b5f592fb" > Cache-Control:no-cache > Connection:keep-alive > Content-Length:123 > Content-type:application/x-www-form-urlencoded > .... > Host:my_aggregate_subdomain.com:8083 > Origin:http://my_aggregate_subdomain.com:8083 > Pragma:no-cache > Referer:http://my_aggregate_subdomain.com:8083/ODKAggregate/Aggregate.html > User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, > like Gecko) Chrome/39.0.2171.95 Safari/537.36 > > Form Data > enketo_api_url:http://192.168.2.140:13131/api/v1/survey > form_id:MY_FORM_NAME > enketo_api_token:MY_API > Response Headersview source > Content-Length:0 > Date:Mon, 15 Dec 2014 15:35:15 GMT > Server:Apache-Coyote/1.1 > *----------------------------* > > Thnx for the help, > Piqo > > > > > > > > > > > On Tuesday, December 9, 2014 5:50:15 PM UTC+1, martijn wrote: > > /api/v1 and /api_v1 are the same by the way. The first is the preferred > path for enketo-express (api_v1 was what enketo-legacy was using and > therefore added as an alias to enketo-express). So corrected cURL snippet > is: > > *curl --user MY_API: -d "server_url=http://192.168.2.140:8083/ODKAggregate > &form_id > =MY_FORM_NAME > " http://192.168.2.140:13131/api/v1/ > survey* > > On Tuesday, December 9, 2014 9:12:36 AM UTC-7, martijn wrote: > > Hi Piqo, > > All seems good now (if you want to protect your enketo-express > installation even better in the future, the "server url" in config.json > should be "http://192.168.2.140:8083/ODKAggregate > "). In any case all API > calls to Enketo should use that value for the server_url parameter. > > The only thing to clarify is how the API works. The API url is indeed > http://192.168.2.140:13131/api/v1/ > (or v2). However, this URL by itself just redirects to apidocs.enketo.org > for a GET request and returns a 405 for any other request. When you try to > communicate with Enketo (or any other REST API), you have to pick a* > method* (POST or DELETE) and an *endpoint* based on what you'd like > Enketo to do. The main API call (and the only one that is currently > built-in to ODK Aggregate) is: POST /survey > (but there are many others). > > So your curl snippet should be something like this (and this is what > Aggregate when you click the Enketo button): > > *curl --user MY_API: -d "server_url=http://192.168.2.140:8083/ODKAggregate > &form_id > =MY_FORM_NAME > " http://192.168.2.140:13131/api_v1/ > survey* > > To illustrate the what the 2 parameters (server_url and form_id) in this > API call do: > > 1. Enketo will go and visit the formList, by appending "/formList" to > the server_url => http://192.168.2.140:8083/ODKAggregate > > /formList > 2. It will do a search inside this formList to find the form resources > belonging to the form_id you provided > 3. It will now be able to load these resources > 4. When submitting a record Enketo will know to submit to 'server_url' > + '/submission' => http://192.168.2.140:8083/ODKAggregate > > /submission > > Cheers, > Martijn > > P.S. the GET methods are purely for developers who'd like to traverse the > API in the browser (without cURL). API calls with this method have no > practical use because a GET request should never alter the database, so it > can only be used for surveys that were POSTed earlier. > > On Tuesday, December 9, 2014 3:28:15 AM UTC-7, El Piqo wrote: > > UPDATE > the url > http://192.168.2.140:8083/ODKAggregate/formList > shows the my form: > > MY FORM NAME > > > > *In browser, http://my_domain (that points to > 192.168.2.140):8083/ODKAggregate/formXml?formId=My_FORM_NAME* > > *downloads successfully the form.. * > > *When I try: curl --user MY_API: -d > "server_url=http://192.168.2.140:8083/ODKAggregate/formXml?formId=MY_FORM_NAME > " > http://192.168.2.140:13131/api_v1/ * > *{* > * "code": 405,* > * "message": "Not allowed"* > } > > I get the same when I try the api/v2 URL. > > *Any idea would be appreciated, * > *Thnx* > > On Tuesday, December 9, 2014 11:16:35 AM UTC+1, El Piqo wrote: > > Hi Martijn, > > ODK is installed in http://192.168.2.140:8083 > > *http://192.168.2.140:8083/formList * > says *The requested resource (/formList) is not available.* I searched > for troubleshooting it but nothing so far. > > I'm now a bit unclear about API url, isnt it > http://192.168.2.140:13131/api/v2 > > *I tried api_v1 when curling the result was the same, but now i guess it > is pointless since it is not able get the form properly.* > > > My current configuration > > Enketo's Config.js (server url set to blank to accept from all servers, as > suggested) > > *{* > * "app name": "Enketo Smart Paper for KoBoCAT",* > * "port": "13131",* > * "linked form and data server": {* > * "name": "Enketo",* > * "server url": "",* > * "api key": "MY_API_HERE"* > * },* > * "support": {* > * "email": "info at kobotoolbox.org "* > * },* > * "google": {* > * "analytics": {* > * "ua": "",* > * "domain": ""* > * },* > * "api key": ""* > * },* > * "maps": [ {* > * "tiles": [ "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png > " ],* > * "attribution": "Map data ยฉ \">OpenStreetMap contributors"* > * } ],* > * "widgets": [* > * "enketo-widget/note/notewidget",* > * "enketo-widget/select-desktop/selectpicker",* > * "enketo-widget/select-mobile/selectpicker",* > * "enketo-widget/geo/geopicker",* > * "enketo-widget/table/tablewidget",* > * "enketo-widget/radio/radiopicker",* > * "enketo-widget/time/timepicker-extended",* > * "enketo-widget/date/datepicker-extended",* > * "enketo-widget/datetime/datetimepicker-extended",* > * "enketo-widget/mediagrid/mediagridpicker",* > * "enketo-widget/select-likert/likertitem",* > * "enketo-widget/distress/distresspicker",* > * "enketo-widget/file/filepicker",* > * "enketo-widget/trigger/triggerwidget"* > * ],* > * "query parameter to pass to submission": "",* > * "redis": {* > * "main": {* > * "host": "127.0.0.1",* > * "port": "6379",* > * "password": #####* > * },* > > * "cache": {* > * "host": "127.0.0.1",* > * "port": "6379",* > * "password": #####* > * }* > * },* > * "logo": {* > * "source": > "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRy$* > * "href": ""* > * }* > *}* > > > > ODK CONFIGURATION: > Enketo API URL > http://192.168.2.140:13131/api/v2 > > The URL of the Enketo service API > Enketo API token > MY_API > > > Best Regards, > piqo > > > > On Friday, December 5, 2014 4:47:03 PM UTC+1, martijn wrote: > > Hi Piqo, > > Your first curl snippet is not a valid API *endpoint*, hence the 405 > response. See valid API v1 endpoints here: http://apidocs.enketo.org/ > (API v2 is not documented yet, but backwards-compatible with v1). > > Where is your Aggregate Server? On http://192.168.2.140 > > or on http://192.168.2.140 > :8083? > Both are very different. This is the server_url you should use in your API > requests as this is where Enketo will retrieve your forms and submit data > to. To test whether your server_url is actually reachable by Enketo (it > isn't currently), just add /formList to the server_url and try to access > this in your browser. > > For further assistance, please cut and paste this relevant section from > your enketo-express installation: > https://github.com/enketo/enketo-express/blob/master/config/config.json#L4-L11. > That will make it easier to help. Make sure to restart the app after making > any changes to config.json. > > Cheers, > Martijn > > On Friday, December 5, 2014 7:15:12 AM UTC-7, El Piqo wrote: > > Hi Martin, > > When in 'grunt develop' I get the following (after I removed the server > url in config.json, I dont get an messagebox error, it's a 200 but nothing > is shown): > > api-controller account +10s { openRosaServer: ' > http://myaggregade.domain.com:8083/ODKAggregate', > key: 'zu13jclsujf8gds4i' } > survey-model getting id for : or: > myaggregade.domain.com:8083/odkaggregate,my_form_name +2ms > survey-model result +1ms null YYYp > api-controller id: YYYp +0ms > survey-model getting id for : or: > myaggregade.domain.com:8083/odkaggregate,my_form_name +1ms > survey-model result +0ms null YYYp > > When I post from curl I get: > > > curl --user MYAPI: -d "server_url=http://192.168.2.140 > &form_id=my_form_name"* http//192.168.2.140:13131/api/v2/ > * > { > "code": 405, > "message": "Not allowed" > > ...

--

Revolutionizing data collection since 2012.

Enketo https://enketo.org/ | LinkedIn
http://www.linkedin.com/company/enketo-llc | GitHub
https://github.com/enketo | Twitter https://twitter.com/enketo
| Blog http://blog.enketo.org/

1 Like

Voila. Good news regarding Enketo-express side. I did also pull today from
github (didn't see too many differences from my previous pull so I'm not
sure if this is the reason why it worked). When I sent an API call to
enketo-express today, the link I received showed the form successfully (The
print button though didn't work). I filled the form and the data was
submitted to ODK 1.4.4 successfully. Thnx.

From ODK side the the issue is still present.

ยทยทยท On Monday, December 15, 2014 7:12:58 PM UTC+1, martijn wrote: > > Hi Piqo, > > Enketo-Express: > > The API response and your Enketo express installation seems fine. If it > doesn't load the form (on url http://192.168.2.140:13131/::YYYp in the > browser), that will be because the form with ID "MY_FORM_NAME" cannot be > reached or maybe it doesn't exist on *http://my_aggregate_subdomain.al:8083/ODKAggregate > /formList*, > or is protected. In all those cases, you should see a helpful error message > telling you what's wrong when loading the URL in your browser. > > ODK Aggregate: > > You are definitely an Enketo-Express/Aggregate pioneer (thanks for that). > Make sure you are using the latest version of Enketo-Express and that both > ODK Aggregate and Enketo-express can communicate with each other (in your > case, are on the same local network). I made sure the API of the old Enketo > App and new Enketo App functions in the same way and return the same > responses, so the apps could in theory be swapped without pain.... However, > it seems you've run into an issue caused by some subtle difference in the > responses/communication between the different Enketo apps and Aggregate. I > don't yet know what's going on so I'm posting this here to see if anybody > can help. I'm cross-posting this to the ODK-Dev forum. > > An API call to the old Enketo-legacy shows the following Aggegrate (v > 1.4.3) log with the correct 200 response and a 46 Byte size from which the > Enketo URL can be extracted: > > > > in the terminal with cURL this response is received: > > < HTTP/1.1 200 OK > < Date: Mon, 15 Dec 2014 17:56:04 GMT > * Server Apache/2.2.22 (Ubuntu) is not blacklisted > < Server: Apache/2.2.22 (Ubuntu) > < X-Powered-By: PHP/5.3.10-1ubuntu3.15 > < Set-Cookie: __enketo_a=[removed this] > <* Content-Length: 67* > < Content-Type: application/json > < > { > "url": "https:\/\/ocxat.enketo.org\/webform", > "code": "200" > * Connection #0 to host enketo.org left intact > } > > > The same API call to an enketo-express server shows the following log, > also with a 200 response* but with a 0 B response* and therefore without > an enketo url to redirect to. > > > > > > in the terminal with cURL the same API call shows this response (this > response *does* have a body): > > < HTTP/1.1 200 OK > * Server nginx/1.4.6 (Ubuntu) is not blacklisted > < Server: nginx/1.4.6 (Ubuntu) > < Date: Mon, 15 Dec 2014 17:54:42 GMT > < Content-Type: application/json; charset=utf-8 > < *Content-Length: 54* > < Connection: keep-alive > < X-Powered-By: Express > < Vary: Accept-Encoding > < > { > "url": "http://enk.to/::YYYH", > "code": 200 > * Connection #0 to host enk.to left intact > } > > Any ideas, anybody? > > Cheers, > Martijn > > > On Monday, December 15, 2014 9:19:12 AM UTC-7, El Piqo wrote: > > Hi Martijn, > the: > *curl --user MY_API: -d > "server_url=http://my_aggregate_subdomain.al:8083/ODKAggregate&form_id=MY_FORM_NAME > " > http://192.168.2.140:13131/api/v1/Survey > * > > returns a: > *{* > * "url": "http://192.168.2.140:13131/::YYYp > ",* > * "code": 200* > *}* > > I dont get what ::YYYP is, but does this mean that from enketo-express > side everything is working properly? From ODK when I click on Enketo > Webform nothing happens. (posting Headers below) > Should I investigate the issue with ODK guys? BTW, has this been tried > before? because I get the feeling I'm the first to try to connect these two > (ODK 1.4.4 <-> Enketo-Express). Or perhaps just bad luck. :) > > > *HEADERS on POST from ODK 1.4.4:* > *-------------------------------* > *Remote Address:192.168.2.140:8083 * > *Request > URL:http://my_aggregate_subdomain.com:8083/ODKAggregate/enk/enketoApiHandler > * > Request Method:POST > Status Code:200 OK > > Request Headers > Accept:*/* > Accept-Encoding:gzip, deflate > Accept-Language:en-US,en;q=0.8,sq;q=0.6 > Authorization:Digest username="odk_username", realm="ODK 1.4.4 Aggregate", > nonce="MTQxODY1ODU3MjczMTplNjBjMmVjOWM5ZmfIwZjNjMjYzMTZkMDZmZTI2NDIyOQ==", > uri="/ODKAggregate/enk/enketoApiHandler", > response="ce8c169bb06c3dfcbfb466cb4sfbd280d0", qop=auth, nc=000001c7, > cnonce="78adddd3b5f592fb" > Cache-Control:no-cache > Connection:keep-alive > Content-Length:123 > Content-type:application/x-www-form-urlencoded > .... > Host:my_aggregate_subdomain.com:8083 > Origin:http://my_aggregate_subdomain.com:8083 > Pragma:no-cache > Referer:http://my_aggregate_subdomain.com:8083/ODKAggregate/Aggregate.html > User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, > like Gecko) Chrome/39.0.2171.95 Safari/537.36 > > Form Data > enketo_api_url:http://192.168.2.140:13131/api/v1/survey > form_id:MY_FORM_NAME > enketo_api_token:MY_API > Response Headersview source > Content-Length:0 > Date:Mon, 15 Dec 2014 15:35:15 GMT > Server:Apache-Coyote/1.1 > *----------------------------* > > Thnx for the help, > Piqo > > > > > > > > > > > On Tuesday, December 9, 2014 5:50:15 PM UTC+1, martijn wrote: > > /api/v1 and /api_v1 are the same by the way. The first is the preferred > path for enketo-express (api_v1 was what enketo-legacy was using and > therefore added as an alias to enketo-express). So corrected cURL snippet > is: > > *curl --user MY_API: -d "server_url=http://192.168.2.140:8083/ODKAggregate > &form_id > =MY_FORM_NAME > " http://192.168.2.140:13131/api/v1/ > survey* > > On Tuesday, December 9, 2014 9:12:36 AM UTC-7, martijn wrote: > > Hi Piqo, > > All seems good now (if you want to protect your enketo-express > installation even better in the future, the "server url" in config.json > should be "http://192.168.2.140:8083/ODKAggregate > "). In any case all API > calls to Enketo should use that value for the server_url parameter. > > The only thing to clarify is how the API works. The API url is indeed > http://192.168.2.140:13131/api/v1/ > (or v2). However, this URL by itself just redirects to apidocs.enketo.org > for a GET request and returns a 405 for any other request. When you try to > communicate with Enketo (or any other REST API), you have to pick a* > method* (POST or DELETE) and an *endpoint* based on what you'd like > Enketo to do. The main API call (and the only one that is currently > built-in to ODK Aggregate) is: POST /survey > (but there are many others). > > So your curl snippet should be something like this (and this is what > Aggregate when you click the Enketo button): > > *curl --user MY_API: -d "server_url=http://192.168.2.140:8083/ODKAggregate > &form_id > =MY_FORM_NAME > " http://192.168.2.140:13131/api_v1/ > survey* > > To illustrate the what the 2 parameters (server_url and form_id) in this > API call do: > > 1. Enketo will go and visit the formList, by appending "/formList" to > the server_url => http://192.168.2.140:8083/ODKAggregate > > /formList > 2. It will do a search inside this formList to find the form resources > belonging to the form_id you provided > 3. It will now be able to load these resources > 4. When submitting a record Enketo will know to submit to 'server_url' > + '/submission' => http://192.168.2.140:8083/ODKAggregate > > /submission > > Cheers, > Martijn > > P.S. the GET methods are purely for developers who'd like to traverse the > API in the browser (without cURL). API calls with this method have no > practical use because a GET request should never alter the database, so it > can only be used for surveys that were POSTed earlier. > > On Tuesday, December 9, 2014 3:28:15 AM UTC-7, El Piqo wrote: > > UPDATE > the url > http://192.168.2.140:8083/ODKAggregate/formList > shows the my form: > > MY FORM NAME > > > > *In browser, http://my_domain (that points to > 192.168.2.140):8083/ODKAggregate/formXml?formId=My_FORM_NAME* > > *downloads successfully the form.. * > > *When I try: curl --user MY_API: -d > "server_url=http://192.168.2.140:8083/ODKAggregate/formXml?formId=MY_FORM_NAME > " > http://192.168.2.140:13131/api_v1/ * > *{* > * "code": 405,* > * "message": "Not allowed"* > } > > I get the same when I try the api/v2 URL. > > *Any idea would be appreciated, * > *Thnx* > > On Tuesday, December 9, 2014 11:16:35 AM UTC+1, El Piqo wrote: > > Hi Martijn, > > ODK is installed in http://192.168.2.140:8083 > > *http://192.168.2.140:8083/formList * > says *The requested resource (/formList) is not available.* I searched > for troubleshooting it but nothing so far. > > I'm now a bit unclear about API url, isnt it > http://192.168.2.140:13131/api/v2 > > *I tried api_v1 when curling the result was the same, but now i guess it > is pointless since it is not able get the form properly.* > > > My current configuration > > Enketo's Config.js (server url set to blank to accept from all servers, as > suggested) > > *{* > * "app name": "Enketo Smart Paper for KoBoCAT",* > * "port": "13131",* > * "linked form and data server": {* > * "name": "Enketo",* > * "server url": "",* > * "api key": "MY_API_HERE"* > * },* > * "support": {* > * "email": "info at kobotoolbox.org "* > * },* > * "google": {* > * "analytics": {* > * "ua": "",* > * "domain": ""* > * },* > * "api key": ""* > * },* > * "maps": [ {* > * "tiles": [ "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png > " ],* > * "attribution": "Map data ยฉ \">OpenStreetMap contributors"* > * } ],* > * "widgets": [* > * "enketo-widget/note/notewidget",* > * "enketo-widget/select-desktop/selectpicker",* > * "enketo-widget/select-mobile/selectpicker",* > * "enketo-widget/geo/geopicker",* > * "enketo-widget/table/tablewidget",* > * "enketo-widget/radio/radiopicker",* > * "enketo-widget/time/timepicker-extended",* > * "enketo-widget/date/datepicker-extended",* > * "enketo-widget/datetime/datetimepicker-extended",* > * "enketo-widget/mediagrid/mediagridpicker",* > * "enketo-widget/select-likert/likertitem",* > * "enketo-widget/distress/distresspicker",* > * "enketo-widget/file/filepicker",* > * "enketo-widget/trigger/triggerwidget"* > * ],* > * "query parameter to pass to submission": "",* > * "redis": {* > * "main": {* > * "host": "127.0.0.1",* > * "port": "6379",* > * "password": #####* > * },* > > * "cache": {* > * "host": "127.0.0.1",* > * "port": "6379",* > * "password": #####* > * }* > * },* > * "logo": {* > * "source": > "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLT* > > ...

I checked Catalina logs from ODK and they showed the same logs for
Enketo.org (which works) and my enketo-express which didn't work.

Trying to understand more, I was looking the java code of
EnketoApiHandlerServlet.java and saw something that maybe its related
(ODK guys will know best)

Line 107 checks if URL contains 'https'. In my enketo-express installation
this is not the case... and the responseURL variable remains NULL.

https://code.google.com/p/opendatakit/source/browse/src/main/java/org/opendatakit/aggregate/servlet/EnketoApiHandlerServlet.java?repo=aggregate&name=v1_4&r=7da4343376658865e132283475b2cddb9dc65bba

What do you think?

ยทยทยท On Monday, December 15, 2014 7:12:58 PM UTC+1, martijn wrote: > > Hi Piqo, > > Enketo-Express: > > The API response and your Enketo express installation seems fine. If it > doesn't load the form (on url http://192.168.2.140:13131/::YYYp in the > browser), that will be because the form with ID "MY_FORM_NAME" cannot be > reached or maybe it doesn't exist on *http://my_aggregate_subdomain.al:8083/ODKAggregate > /formList*, > or is protected. In all those cases, you should see a helpful error message > telling you what's wrong when loading the URL in your browser. > > ODK Aggregate: > > You are definitely an Enketo-Express/Aggregate pioneer (thanks for that). > Make sure you are using the latest version of Enketo-Express and that both > ODK Aggregate and Enketo-express can communicate with each other (in your > case, are on the same local network). I made sure the API of the old Enketo > App and new Enketo App functions in the same way and return the same > responses, so the apps could in theory be swapped without pain.... However, > it seems you've run into an issue caused by some subtle difference in the > responses/communication between the different Enketo apps and Aggregate. I > don't yet know what's going on so I'm posting this here to see if anybody > can help. I'm cross-posting this to the ODK-Dev forum. > > An API call to the old Enketo-legacy shows the following Aggegrate (v > 1.4.3) log with the correct 200 response and a 46 Byte size from which the > Enketo URL can be extracted: > > > > in the terminal with cURL this response is received: > > < HTTP/1.1 200 OK > < Date: Mon, 15 Dec 2014 17:56:04 GMT > * Server Apache/2.2.22 (Ubuntu) is not blacklisted > < Server: Apache/2.2.22 (Ubuntu) > < X-Powered-By: PHP/5.3.10-1ubuntu3.15 > < Set-Cookie: __enketo_a=[removed this] > <* Content-Length: 67* > < Content-Type: application/json > < > { > "url": "https:\/\/ocxat.enketo.org\/webform", > "code": "200" > * Connection #0 to host enketo.org left intact > } > > > The same API call to an enketo-express server shows the following log, > also with a 200 response* but with a 0 B response* and therefore without > an enketo url to redirect to. > > > > > > in the terminal with cURL the same API call shows this response (this > response *does* have a body): > > < HTTP/1.1 200 OK > * Server nginx/1.4.6 (Ubuntu) is not blacklisted > < Server: nginx/1.4.6 (Ubuntu) > < Date: Mon, 15 Dec 2014 17:54:42 GMT > < Content-Type: application/json; charset=utf-8 > < *Content-Length: 54* > < Connection: keep-alive > < X-Powered-By: Express > < Vary: Accept-Encoding > < > { > "url": "http://enk.to/::YYYH", > "code": 200 > * Connection #0 to host enk.to left intact > } > > Any ideas, anybody? > > Cheers, > Martijn > > > On Monday, December 15, 2014 9:19:12 AM UTC-7, El Piqo wrote: > > Hi Martijn, > the: > *curl --user MY_API: -d > "server_url=http://my_aggregate_subdomain.al:8083/ODKAggregate&form_id=MY_FORM_NAME > " > http://192.168.2.140:13131/api/v1/Survey > * > > returns a: > *{* > * "url": "http://192.168.2.140:13131/::YYYp > ",* > * "code": 200* > *}* > > I dont get what ::YYYP is, but does this mean that from enketo-express > side everything is working properly? From ODK when I click on Enketo > Webform nothing happens. (posting Headers below) > Should I investigate the issue with ODK guys? BTW, has this been tried > before? because I get the feeling I'm the first to try to connect these two > (ODK 1.4.4 <-> Enketo-Express). Or perhaps just bad luck. :) > > > *HEADERS on POST from ODK 1.4.4:* > *-------------------------------* > *Remote Address:192.168.2.140:8083 * > *Request > URL:http://my_aggregate_subdomain.com:8083/ODKAggregate/enk/enketoApiHandler > * > Request Method:POST > Status Code:200 OK > > Request Headers > Accept:*/* > Accept-Encoding:gzip, deflate > Accept-Language:en-US,en;q=0.8,sq;q=0.6 > Authorization:Digest username="odk_username", realm="ODK 1.4.4 Aggregate", > nonce="MTQxODY1ODU3MjczMTplNjBjMmVjOWM5ZmfIwZjNjMjYzMTZkMDZmZTI2NDIyOQ==", > uri="/ODKAggregate/enk/enketoApiHandler", > response="ce8c169bb06c3dfcbfb466cb4sfbd280d0", qop=auth, nc=000001c7, > cnonce="78adddd3b5f592fb" > Cache-Control:no-cache > Connection:keep-alive > Content-Length:123 > Content-type:application/x-www-form-urlencoded > .... > Host:my_aggregate_subdomain.com:8083 > Origin:http://my_aggregate_subdomain.com:8083 > Pragma:no-cache > Referer:http://my_aggregate_subdomain.com:8083/ODKAggregate/Aggregate.html > User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, > like Gecko) Chrome/39.0.2171.95 Safari/537.36 > > Form Data > enketo_api_url:http://192.168.2.140:13131/api/v1/survey > form_id:MY_FORM_NAME > enketo_api_token:MY_API > Response Headersview source > Content-Length:0 > Date:Mon, 15 Dec 2014 15:35:15 GMT > Server:Apache-Coyote/1.1 > *----------------------------* > > Thnx for the help, > Piqo > > > > > > > > > > > On Tuesday, December 9, 2014 5:50:15 PM UTC+1, martijn wrote: > > /api/v1 and /api_v1 are the same by the way. The first is the preferred > path for enketo-express (api_v1 was what enketo-legacy was using and > therefore added as an alias to enketo-express). So corrected cURL snippet > is: > > *curl --user MY_API: -d "server_url=http://192.168.2.140:8083/ODKAggregate > &form_id > =MY_FORM_NAME > " http://192.168.2.140:13131/api/v1/ > survey* > > On Tuesday, December 9, 2014 9:12:36 AM UTC-7, martijn wrote: > > Hi Piqo, > > All seems good now (if you want to protect your enketo-express > installation even better in the future, the "server url" in config.json > should be "http://192.168.2.140:8083/ODKAggregate > "). In any case all API > calls to Enketo should use that value for the server_url parameter. > > The only thing to clarify is how the API works. The API url is indeed > http://192.168.2.140:13131/api/v1/ > (or v2). However, this URL by itself just redirects to apidocs.enketo.org > for a GET request and returns a 405 for any other request. When you try to > communicate with Enketo (or any other REST API), you have to pick a* > method* (POST or DELETE) and an *endpoint* based on what you'd like > Enketo to do. The main API call (and the only one that is currently > built-in to ODK Aggregate) is: POST /survey > (but there are many others). > > So your curl snippet should be something like this (and this is what > Aggregate when you click the Enketo button): > > *curl --user MY_API: -d "server_url=http://192.168.2.140:8083/ODKAggregate > &form_id > =MY_FORM_NAME > " http://192.168.2.140:13131/api_v1/ > survey* > > To illustrate the what the 2 parameters (server_url and form_id) in this > API call do: > > 1. Enketo will go and visit the formList, by appending "/formList" to > the server_url => http://192.168.2.140:8083/ODKAggregate > > /formList > 2. It will do a search inside this formList to find the form resources > belonging to the form_id you provided > 3. It will now be able to load these resources > 4. When submitting a record Enketo will know to submit to 'server_url' > + '/submission' => http://192.168.2.140:8083/ODKAggregate > > /submission > > Cheers, > Martijn > > P.S. the GET methods are purely for developers who'd like to traverse the > API in the browser (without cURL). API calls with this method have no > practical use because a GET request should never alter the database, so it > can only be used for surveys that were POSTed earlier. > > On Tuesday, December 9, 2014 3:28:15 AM UTC-7, El Piqo wrote: > > UPDATE > the url > http://192.168.2.140:8083/ODKAggregate/formList > shows the my form: > > MY FORM NAME > > > > *In browser, http://my_domain (that points to > 192.168.2.140):8083/ODKAggregate/formXml?formId=My_FORM_NAME* > > *downloads successfully the form.. * > > *When I try: curl --user MY_API: -d > "server_url=http://192.168.2.140:8083/ODKAggregate/formXml?formId=MY_FORM_NAME > " > http://192.168.2.140:13131/api_v1/ * > *{* > * "code": 405,* > * "message": "Not allowed"* > } > > I get the same when I try the api/v2 URL. > > *Any idea would be appreciated, * > *Thnx* > > On Tuesday, December 9, 2014 11:16:35 AM UTC+1, El Piqo wrote: > > Hi Martijn, > > ODK is installed in http://192.168.2.140:8083 > > *http://192.168.2.140:8083/formList * > says *The requested resource (/formList) is not available.* I searched > for troubleshooting it but nothing so far. > > I'm now a bit unclear about API url, isnt it > http://192.168.2.140:13131/api/v2 > > *I tried api_v1 when curling the result was the same, but now i guess it > is pointless since it is not able get the form properly.* > > > My current configuration > > Enketo's Config.js (server url set to blank to accept from all servers, as > suggested) > > *{* > * "app name": "Enketo Smart Paper for KoBoCAT",* > * "port": "13131",* > * "linked form and data server": {* > * "name": "Enketo",* > * "server url": "",* > * "api key": "MY_API_HERE"* > * },* > * "support": {* > * "email": "info at kobotoolbox.org "* > * },* > * "google": {* > * "analytics": {* > * "ua": "",* > * "domain": ""* > * },* > * "api key": ""* > * },* > * "maps": [ {* > * "tiles": [ "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png > " ],* > * "attribution": "Map data ยฉ \">OpenStreetMap contributors"* > * } ],* > * "widgets": [* > * "enketo-widget/note/notewidget",* > * "enketo-widget/select-desktop/selectpicker",* > * "enketo-widget/select-mobile/selectpicker",* > * "enketo-widget/geo/geopicker",* > * "enketo-widget/table/tablewidget",* > * "enketo-widget/radio/radiopicker",* > * "enketo-widget/time/timepicker-extended",* > * "enketo-widget/date/datepicker-extended",* > * "enketo-widget/datetime/datetimepicker-extended",* > * "enketo-widget/mediagrid/mediagridpicker",* > * "enketo-widget/select-likert/likertitem",* > * "enketo-widget/distress/distresspicker",* > * "enketo-widget/file/filepicker",* > * "enketo-widget/trigger/triggerwidget"* > * ],* > * "query parameter to pass to submission": "",* > * "redis": {* > * "main": {* > * "host": "127.0.0.1",* > * "port": "6379",* > * "password": #####* > * },* > > * "cache": {* > * "host": "127.0.0.1",* > * "port": "6379",* > * "password": #####* > * }* > * },* > * "logo": {* > * "source": > "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLT* > > ...

Ah, nice one! It looks like this whole code section could be improved a
bit. The fact that it currently shows no error message to the user, should
also be considered a bug.

The way I would do this is:

1 check the http response code
2 if responseCode >= 200 or responseCode <300, parse the JSON response,
check if it contains a "url" property (check validity of url if necessary,
but I wouldn't) and redirect to this url
3 for any other responseCodes, parse the JSON response if exists, check if
contains a "message" property and output this error to the user. If the
response is empty or does not contain a "message" property output a generic
error message.

I don't do Java, so I hope somebody can do this work.... This will mean ODK
Aggregate can be used with the brand new 100% free, open-source,
easy-to-install Enketo Express app (which is still missing some features,
but should become full-featured in a few months).

Cheers,
Martijn

ยทยทยท On Tue, Dec 16, 2014 at 9:03 AM, El Piqo wrote: > > I checked Catalina logs from ODK and they showed the same logs for > Enketo.org (which works) and my enketo-express which didn't work. > > Trying to understand more, I was looking the java code of > *EnketoApiHandlerServlet.java* and saw something that maybe its related > (ODK guys will know best) > > Line 107 checks if URL contains 'https'. In my enketo-express installation > this is not the case... and the responseURL variable remains NULL. > > > https://code.google.com/p/opendatakit/source/browse/src/main/java/org/opendatakit/aggregate/servlet/EnketoApiHandlerServlet.java?repo=aggregate&name=v1_4&r=7da4343376658865e132283475b2cddb9dc65bba > > What do you think? > > > On Monday, December 15, 2014 7:12:58 PM UTC+1, martijn wrote: >> >> Hi Piqo, >> >> Enketo-Express: >> >> The API response and your Enketo express installation seems fine. If it >> doesn't load the form (on url http://192.168.2.140:13131/::YYYp in the >> browser), that will be because the form with ID "MY_FORM_NAME" cannot be >> reached or maybe it doesn't exist on *http://my_aggregate_subdomain.al:8083/ODKAggregate >> /formList*, >> or is protected. In all those cases, you should see a helpful error message >> telling you what's wrong when loading the URL in your browser. >> >> ODK Aggregate: >> >> You are definitely an Enketo-Express/Aggregate pioneer (thanks for that). >> Make sure you are using the latest version of Enketo-Express and that both >> ODK Aggregate and Enketo-express can communicate with each other (in your >> case, are on the same local network). I made sure the API of the old Enketo >> App and new Enketo App functions in the same way and return the same >> responses, so the apps could in theory be swapped without pain.... However, >> it seems you've run into an issue caused by some subtle difference in the >> responses/communication between the different Enketo apps and Aggregate. I >> don't yet know what's going on so I'm posting this here to see if anybody >> can help. I'm cross-posting this to the ODK-Dev forum. >> >> An API call to the old Enketo-legacy shows the following Aggegrate (v >> 1.4.3) log with the correct 200 response and a 46 Byte size from which the >> Enketo URL can be extracted: >> >> >> >> in the terminal with cURL this response is received: >> >> < HTTP/1.1 200 OK >> < Date: Mon, 15 Dec 2014 17:56:04 GMT >> * Server Apache/2.2.22 (Ubuntu) is not blacklisted >> < Server: Apache/2.2.22 (Ubuntu) >> < X-Powered-By: PHP/5.3.10-1ubuntu3.15 >> < Set-Cookie: __enketo_a=[removed this] >> <* Content-Length: 67* >> < Content-Type: application/json >> < >> { >> "url": "https:\/\/ocxat.enketo.org\/webform", >> "code": "200" >> * Connection #0 to host enketo.org left intact >> } >> >> >> The same API call to an enketo-express server shows the following log, >> also with a 200 response* but with a 0 B response* and therefore without >> an enketo url to redirect to. >> >> >> >> >> >> in the terminal with cURL the same API call shows this response (this >> response *does* have a body): >> >> < HTTP/1.1 200 OK >> * Server nginx/1.4.6 (Ubuntu) is not blacklisted >> < Server: nginx/1.4.6 (Ubuntu) >> < Date: Mon, 15 Dec 2014 17:54:42 GMT >> < Content-Type: application/json; charset=utf-8 >> < *Content-Length: 54* >> < Connection: keep-alive >> < X-Powered-By: Express >> < Vary: Accept-Encoding >> < >> { >> "url": "http://enk.to/::YYYH", >> "code": 200 >> * Connection #0 to host enk.to left intact >> } >> >> Any ideas, anybody? >> >> Cheers, >> Martijn >> >> >> On Monday, December 15, 2014 9:19:12 AM UTC-7, El Piqo wrote: >> >> Hi Martijn, >> the: >> *curl --user MY_API: -d >> "server_url=http://my_aggregate_subdomain.al:8083/ODKAggregate&form_id=MY_FORM_NAME >> " >> http://192.168.2.140:13131/api/v1/Survey >> * >> >> returns a: >> *{* >> * "url": "http://192.168.2.140:13131/::YYYp >> ",* >> * "code": 200* >> *}* >> >> I dont get what ::YYYP is, but does this mean that from enketo-express >> side everything is working properly? From ODK when I click on Enketo >> Webform nothing happens. (posting Headers below) >> Should I investigate the issue with ODK guys? BTW, has this been tried >> before? because I get the feeling I'm the first to try to connect these two >> (ODK 1.4.4 <-> Enketo-Express). Or perhaps just bad luck. :) >> >> >> *HEADERS on POST from ODK 1.4.4:* >> *-------------------------------* >> *Remote Address:192.168.2.140:8083 * >> *Request >> URL:http://my_aggregate_subdomain.com:8083/ODKAggregate/enk/enketoApiHandler >> * >> Request Method:POST >> Status Code:200 OK >> >> Request Headers >> Accept:*/* >> Accept-Encoding:gzip, deflate >> Accept-Language:en-US,en;q=0.8,sq;q=0.6 >> Authorization:Digest username="odk_username", >> realm="ODK 1.4.4 Aggregate", nonce="MTQxODY1ODU3MjczMTplNjBjMmVjOW >> M5ZmfIwZjNjMjYzMTZkMDZmZTI2NDIyOQ==", uri="/ODKAggregate/enk/enketoApiHandler", >> response="ce8c169bb06c3dfcbfb466cb4sfbd280d0", qop=auth, nc=000001c7, >> cnonce="78adddd3b5f592fb" >> Cache-Control:no-cache >> Connection:keep-alive >> Content-Length:123 >> Content-type:application/x-www-form-urlencoded >> .... >> Host:my_aggregate_subdomain.com:8083 >> Origin:http://my_aggregate_subdomain.com:8083 >> Pragma:no-cache >> Referer:http://my_aggregate_subdomain.com:8083/ >> ODKAggregate/Aggregate.html >> User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, >> like Gecko) Chrome/39.0.2171.95 Safari/537.36 >> >> Form Data >> enketo_api_url:http://192.168.2.140:13131/api/v1/survey >> form_id:MY_FORM_NAME >> enketo_api_token:MY_API >> Response Headersview source >> Content-Length:0 >> Date:Mon, 15 Dec 2014 15:35:15 GMT >> Server:Apache-Coyote/1.1 >> *----------------------------* >> >> Thnx for the help, >> Piqo >> >> >> >> >> >> >> >> >> >> >> On Tuesday, December 9, 2014 5:50:15 PM UTC+1, martijn wrote: >> >> /api/v1 and /api_v1 are the same by the way. The first is the preferred >> path for enketo-express (api_v1 was what enketo-legacy was using and >> therefore added as an alias to enketo-express). So corrected cURL snippet >> is: >> >> *curl --user MY_API: -d >> "server_url=http://192.168.2.140:8083/ODKAggregate >> &form_id >> =MY_FORM_NAME >> " http://192.168.2.140:13131/api/v1/ >> survey* >> >> On Tuesday, December 9, 2014 9:12:36 AM UTC-7, martijn wrote: >> >> Hi Piqo, >> >> All seems good now (if you want to protect your enketo-express >> installation even better in the future, the "server url" in config.json >> should be "http://192.168.2.140:8083/ODKAggregate >> "). In any case all API >> calls to Enketo should use that value for the server_url parameter. >> >> The only thing to clarify is how the API works. The API url is indeed >> http://192.168.2.140:13131/api/v1/ >> (or v2). However, this URL by itself just redirects to apidocs.enketo.org >> for a GET request and returns a 405 for any other request. When you try to >> communicate with Enketo (or any other REST API), you have to pick a* >> method* (POST or DELETE) and an *endpoint* based on what you'd like >> Enketo to do. The main API call (and the only one that is currently >> built-in to ODK Aggregate) is: POST /survey >> (but there are many others). >> >> So your curl snippet should be something like this (and this is what >> Aggregate when you click the Enketo button): >> >> *curl --user MY_API: -d >> "server_url=http://192.168.2.140:8083/ODKAggregate >> &form_id >> =MY_FORM_NAME >> " http://192.168.2.140:13131/api_v1/ >> survey* >> >> To illustrate the what the 2 parameters (server_url and form_id) in this >> API call do: >> >> 1. Enketo will go and visit the formList, by appending "/formList" to >> the server_url => http://192.168.2.140:8083/ODKAggregate >> >> /formList >> 2. It will do a search inside this formList to find the form >> resources belonging to the form_id you provided >> 3. It will now be able to load these resources >> 4. When submitting a record Enketo will know to submit to >> 'server_url' + '/submission' => http://192.168.2.140:8083/ODKAggregate >> >> /submission >> >> Cheers, >> Martijn >> >> P.S. the GET methods are purely for developers who'd like to traverse the >> API in the browser (without cURL). API calls with this method have no >> practical use because a GET request should never alter the database, so it >> can only be used for surveys that were POSTed earlier. >> >> On Tuesday, December 9, 2014 3:28:15 AM UTC-7, El Piqo wrote: >> >> UPDATE >> the url >> http://192.168.2.140:8083/ODKAggregate/formList >> shows the my form: >> >> MY FORM NAME >> >> >> *In browser, http://my_domain (that points to >> 192.168.2.140):8083/ODKAggregate/formXml?formId=My_FORM_NAME* >> >> *downloads successfully the form.. * >> >> *When I try: curl --user MY_API: -d >> "server_url=http://192.168.2.140:8083/ODKAggregate/formXml?formId=MY_FORM_NAME >> " >> http://192.168.2.140:13131/api_v1/ * >> *{* >> * "code": 405,* >> * "message": "Not allowed"* >> } >> >> I get the same when I try the api/v2 URL. >> >> *Any idea would be appreciated, * >> *Thnx* >> >> On Tuesday, December 9, 2014 11:16:35 AM UTC+1, El Piqo wrote: >> >> Hi Martijn, >> >> ODK is installed in http://192.168.2.140:8083 >> >> *http://192.168.2.140:8083/formList * >> says *The requested resource (/formList) is not available.* I searched >> for troubleshooting it but nothing so far. >> >> I'm now a bit unclear about API url, isnt it http://192.168.2.140:13131/ >> api/v2 >> >> *I tried api_v1 when curling the result was the same, but now i guess it >> is pointless since it is not able get the form properly.* >> >> >> My current configuration >> >> Enketo's Config.js (server url set to blank to accept from all servers, >> as suggested) >> >> *{* >> * "app name": "Enketo Smart Paper for KoBoCAT",* >> * "port": "13131",* >> * "linked form and data server": {* >> * "name": "Enketo",* >> * "server url": "",* >> * "api key": "MY_API_HERE"* >> * },* >> * "support": {* >> * "email": "info at kobotoolbox.org "* >> * },* >> * "google": {* >> * "analytics": {* >> * "ua": "",* >> * "domain": ""* >> * },* >> * "api key": ""* >> * },* >> * "maps": [ {* >> * "tiles": [ "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png >> " ],* >> * "attribution": "Map data ยฉ > \">OpenStreetMap contributors"* >> * } ],* >> * "widgets": [* >> * "enketo-widget/note/notewidget",* >> * "enketo-widget/select-desktop/selectpicker",* >> * "enketo-widget/select-mobile/selectpicker",* >> * "enketo-widget/geo/geopicker",* >> * "enketo-widget/table/tablewidget",* >> * "enketo-widget/radio/radiopicker",* >> * "enketo-widget/time/timepicker-extended",* >> * "enketo-widget/date/datepicker-extended",* >> * "enketo-widget/datetime/datetimepicker-extended",* >> * "enketo-widget/mediagrid/mediagridpicker",* >> * "enketo-widget/select-likert/likertitem",* >> * "enketo-widget/distress/distresspicker",* >> * "enketo-widget/file/filepicker",* >> * "enketo-widget/trigger/triggerwidget"* >> * ],* >> * "query parameter to pass to submission": "",* >> * "redis": {* >> * "main": {* >> * "host": "127.0.0.1",* >> * "port": "6379",* >> * "password": #####* >> * },* >> >> * "cache": {* >> * "host": "127.0.0.1",* >> * "port": "6379",* >> * "password": #####* >> * }* >> * },* >> * "logo": {* >> * "source": >> "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLT* >> >> ... > > -- > You received this message because you are subscribed to the Google Groups > "enketo-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to enketo-users+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >

--

Revolutionizing data collection since 2012.

Enketo https://enketo.org/ | LinkedIn
http://www.linkedin.com/company/enketo-llc | GitHub
https://github.com/enketo | Twitter https://twitter.com/enketo
| Blog http://blog.enketo.org/

The reason for the check for https is that the request is using Basic
authentication -- that encodes the username and password in plaintext on
the request.

i.e., Basic authentication should never be used outside of an https
transport.

The code could be reworked to not supply any authentication if the response
URL specifies http.

Does the Enketo-Express require authentication?

ยทยทยท On Tue, Dec 16, 2014 at 8:23 AM, Martijn van de Rijdt wrote: > > Ah, nice one! It looks like this whole code section could be improved a > bit. The fact that it currently shows no error message to the user, should > also be considered a bug. > > The way I would do this is: > > 1 check the http response code > 2 if responseCode >= 200 or responseCode <300, parse the JSON response, > check if it contains a "url" property (check validity of url if necessary, > but I wouldn't) and redirect to this url > 3 for any other responseCodes, parse the JSON response if exists, check if > contains a "message" property and output this error to the user. If the > response is empty or does not contain a "message" property output a generic > error message. > > I don't do Java, so I hope somebody can do this work.... This will mean > ODK Aggregate can be used with the brand new 100% free, open-source, > easy-to-install Enketo Express app (which is still missing some features, > but should become full-featured in a few months). > > Cheers, > Martijn > > On Tue, Dec 16, 2014 at 9:03 AM, El Piqo wrote: >> >> I checked Catalina logs from ODK and they showed the same logs for >> Enketo.org (which works) and my enketo-express which didn't work. >> >> Trying to understand more, I was looking the java code of >> *EnketoApiHandlerServlet.java* and saw something that maybe its related >> (ODK guys will know best) >> >> Line 107 checks if URL contains 'https'. In my enketo-express >> installation this is not the case... and the responseURL variable >> remains NULL. >> >> >> https://code.google.com/p/opendatakit/source/browse/src/main/java/org/opendatakit/aggregate/servlet/EnketoApiHandlerServlet.java?repo=aggregate&name=v1_4&r=7da4343376658865e132283475b2cddb9dc65bba >> >> What do you think? >> >> >> On Monday, December 15, 2014 7:12:58 PM UTC+1, martijn wrote: >>> >>> Hi Piqo, >>> >>> Enketo-Express: >>> >>> The API response and your Enketo express installation seems fine. If it >>> doesn't load the form (on url http://192.168.2.140:13131/::YYYp in the >>> browser), that will be because the form with ID "MY_FORM_NAME" cannot be >>> reached or maybe it doesn't exist on *http://my_aggregate_subdomain.al:8083/ODKAggregate >>> /formList*, >>> or is protected. In all those cases, you should see a helpful error message >>> telling you what's wrong when loading the URL in your browser. >>> >>> ODK Aggregate: >>> >>> You are definitely an Enketo-Express/Aggregate pioneer (thanks for >>> that). Make sure you are using the latest version of Enketo-Express and >>> that both ODK Aggregate and Enketo-express can communicate with each other >>> (in your case, are on the same local network). I made sure the API of the >>> old Enketo App and new Enketo App functions in the same way and return the >>> same responses, so the apps could in theory be swapped without pain.... >>> However, it seems you've run into an issue caused by some subtle difference >>> in the responses/communication between the different Enketo apps and >>> Aggregate. I don't yet know what's going on so I'm posting this here to see >>> if anybody can help. I'm cross-posting this to the ODK-Dev forum. >>> >>> An API call to the old Enketo-legacy shows the following Aggegrate (v >>> 1.4.3) log with the correct 200 response and a 46 Byte size from which the >>> Enketo URL can be extracted: >>> >>> >>> >>> in the terminal with cURL this response is received: >>> >>> < HTTP/1.1 200 OK >>> < Date: Mon, 15 Dec 2014 17:56:04 GMT >>> * Server Apache/2.2.22 (Ubuntu) is not blacklisted >>> < Server: Apache/2.2.22 (Ubuntu) >>> < X-Powered-By: PHP/5.3.10-1ubuntu3.15 >>> < Set-Cookie: __enketo_a=[removed this] >>> <* Content-Length: 67* >>> < Content-Type: application/json >>> < >>> { >>> "url": "https:\/\/ocxat.enketo.org\/webform", >>> "code": "200" >>> * Connection #0 to host enketo.org left intact >>> } >>> >>> >>> The same API call to an enketo-express server shows the following log, >>> also with a 200 response* but with a 0 B response* and therefore >>> without an enketo url to redirect to. >>> >>> >>> >>> >>> >>> in the terminal with cURL the same API call shows this response (this >>> response *does* have a body): >>> >>> < HTTP/1.1 200 OK >>> * Server nginx/1.4.6 (Ubuntu) is not blacklisted >>> < Server: nginx/1.4.6 (Ubuntu) >>> < Date: Mon, 15 Dec 2014 17:54:42 GMT >>> < Content-Type: application/json; charset=utf-8 >>> < *Content-Length: 54* >>> < Connection: keep-alive >>> < X-Powered-By: Express >>> < Vary: Accept-Encoding >>> < >>> { >>> "url": "http://enk.to/::YYYH", >>> "code": 200 >>> * Connection #0 to host enk.to left intact >>> } >>> >>> Any ideas, anybody? >>> >>> Cheers, >>> Martijn >>> >>> >>> On Monday, December 15, 2014 9:19:12 AM UTC-7, El Piqo wrote: >>> >>> Hi Martijn, >>> the: >>> *curl --user MY_API: -d >>> "server_url=http://my_aggregate_subdomain.al:8083/ODKAggregate&form_id=MY_FORM_NAME >>> " >>> http://192.168.2.140:13131/api/v1/Survey >>> * >>> >>> returns a: >>> *{* >>> * "url": "http://192.168.2.140:13131/::YYYp >>> ",* >>> * "code": 200* >>> *}* >>> >>> I dont get what ::YYYP is, but does this mean that from enketo-express >>> side everything is working properly? From ODK when I click on Enketo >>> Webform nothing happens. (posting Headers below) >>> Should I investigate the issue with ODK guys? BTW, has this been tried >>> before? because I get the feeling I'm the first to try to connect these two >>> (ODK 1.4.4 <-> Enketo-Express). Or perhaps just bad luck. :) >>> >>> >>> *HEADERS on POST from ODK 1.4.4:* >>> *-------------------------------* >>> *Remote Address:192.168.2.140:8083 * >>> *Request >>> URL:http://my_aggregate_subdomain.com:8083/ODKAggregate/enk/enketoApiHandler >>> * >>> Request Method:POST >>> Status Code:200 OK >>> >>> Request Headers >>> Accept:*/* >>> Accept-Encoding:gzip, deflate >>> Accept-Language:en-US,en;q=0.8,sq;q=0.6 >>> Authorization:Digest username="odk_username", >>> realm="ODK 1.4.4 Aggregate", nonce="MTQxODY1ODU3MjczMTplNjBjMmVjOW >>> M5ZmfIwZjNjMjYzMTZkMDZmZTI2NDIyOQ==", uri="/ODKAggregate/enk/enketoApiHandler", >>> response="ce8c169bb06c3dfcbfb466cb4sfbd280d0", qop=auth, nc=000001c7, >>> cnonce="78adddd3b5f592fb" >>> Cache-Control:no-cache >>> Connection:keep-alive >>> Content-Length:123 >>> Content-type:application/x-www-form-urlencoded >>> .... >>> Host:my_aggregate_subdomain.com:8083 >>> Origin:http://my_aggregate_subdomain.com:8083 >>> Pragma:no-cache >>> Referer:http://my_aggregate_subdomain.com:8083/ >>> ODKAggregate/Aggregate.html >>> User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 >>> (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 >>> >>> Form Data >>> enketo_api_url:http://192.168.2.140:13131/api/v1/survey >>> form_id:MY_FORM_NAME >>> enketo_api_token:MY_API >>> Response Headersview source >>> Content-Length:0 >>> Date:Mon, 15 Dec 2014 15:35:15 GMT >>> Server:Apache-Coyote/1.1 >>> *----------------------------* >>> >>> Thnx for the help, >>> Piqo >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Tuesday, December 9, 2014 5:50:15 PM UTC+1, martijn wrote: >>> >>> /api/v1 and /api_v1 are the same by the way. The first is the preferred >>> path for enketo-express (api_v1 was what enketo-legacy was using and >>> therefore added as an alias to enketo-express). So corrected cURL snippet >>> is: >>> >>> *curl --user MY_API: -d >>> "server_url=http://192.168.2.140:8083/ODKAggregate >>> &form_id >>> =MY_FORM_NAME >>> " http://192.168.2.140:13131/api/v1/ >>> survey* >>> >>> On Tuesday, December 9, 2014 9:12:36 AM UTC-7, martijn wrote: >>> >>> Hi Piqo, >>> >>> All seems good now (if you want to protect your enketo-express >>> installation even better in the future, the "server url" in config.json >>> should be "http://192.168.2.140:8083/ODKAggregate >>> "). In any case all >>> API calls to Enketo should use that value for the server_url parameter. >>> >>> The only thing to clarify is how the API works. The API url is indeed >>> http://192.168.2.140:13131/api/v1/ >>> (or v2). However, this URL by itself just redirects to >>> apidocs.enketo.org for a GET request and returns a 405 for any other >>> request. When you try to communicate with Enketo (or any other REST API), >>> you have to pick a* method* (POST or DELETE) and an *endpoint* based on >>> what you'd like Enketo to do. The main API call (and the only one that is >>> currently built-in to ODK Aggregate) is: POST /survey >>> (but there are many others). >>> >>> So your curl snippet should be something like this (and this is what >>> Aggregate when you click the Enketo button): >>> >>> *curl --user MY_API: -d >>> "server_url=http://192.168.2.140:8083/ODKAggregate >>> &form_id >>> =MY_FORM_NAME >>> " http://192.168.2.140:13131/api_v1/ >>> survey* >>> >>> To illustrate the what the 2 parameters (server_url and form_id) in this >>> API call do: >>> >>> 1. Enketo will go and visit the formList, by appending "/formList" >>> to the server_url => http://192.168.2.140:8083/ODKAggregate >>> >>> /formList >>> 2. It will do a search inside this formList to find the form >>> resources belonging to the form_id you provided >>> 3. It will now be able to load these resources >>> 4. When submitting a record Enketo will know to submit to >>> 'server_url' + '/submission' => http://192.168.2.140:8083/ >>> ODKAggregate >>> >>> /submission >>> >>> Cheers, >>> Martijn >>> >>> P.S. the GET methods are purely for developers who'd like to traverse >>> the API in the browser (without cURL). API calls with this method have no >>> practical use because a GET request should never alter the database, so it >>> can only be used for surveys that were POSTed earlier. >>> >>> On Tuesday, December 9, 2014 3:28:15 AM UTC-7, El Piqo wrote: >>> >>> UPDATE >>> the url >>> http://192.168.2.140:8083/ODKAggregate/formList >>> shows the my form: >>> >>> MY FORM NAME >>> >>> >>> *In browser, http://my_domain (that points to >>> 192.168.2.140):8083/ODKAggregate/formXml?formId=My_FORM_NAME* >>> >>> *downloads successfully the form.. * >>> >>> *When I try: curl --user MY_API: -d >>> "server_url=http://192.168.2.140:8083/ODKAggregate/formXml?formId=MY_FORM_NAME >>> " >>> http://192.168.2.140:13131/api_v1/ * >>> *{* >>> * "code": 405,* >>> * "message": "Not allowed"* >>> } >>> >>> I get the same when I try the api/v2 URL. >>> >>> *Any idea would be appreciated, * >>> *Thnx* >>> >>> On Tuesday, December 9, 2014 11:16:35 AM UTC+1, El Piqo wrote: >>> >>> Hi Martijn, >>> >>> ODK is installed in http://192.168.2.140:8083 >>> >>> *http://192.168.2.140:8083/formList >>> *says *The requested resource (/formList) is not available.* I searched >>> for troubleshooting it but nothing so far. >>> >>> I'm now a bit unclear about API url, isnt it http://192.168.2.140:13131/ >>> api/v2 >>> >>> *I tried api_v1 when curling the result was the same, but now i guess it >>> is pointless since it is not able get the form properly.* >>> >>> >>> My current configuration >>> >>> Enketo's Config.js (server url set to blank to accept from all servers, >>> as suggested) >>> >>> *{* >>> * "app name": "Enketo Smart Paper for KoBoCAT",* >>> * "port": "13131",* >>> * "linked form and data server": {* >>> * "name": "Enketo",* >>> * "server url": "",* >>> * "api key": "MY_API_HERE"* >>> * },* >>> * "support": {* >>> * "email": "info at kobotoolbox.org "* >>> * },* >>> * "google": {* >>> * "analytics": {* >>> * "ua": "",* >>> * "domain": ""* >>> * },* >>> * "api key": ""* >>> * },* >>> * "maps": [ {* >>> * "tiles": [ "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png >>> " ],* >>> * "attribution": "Map data ยฉ >> \">OpenStreetMap contributors"* >>> * } ],* >>> * "widgets": [* >>> * "enketo-widget/note/notewidget",* >>> * "enketo-widget/select-desktop/selectpicker",* >>> * "enketo-widget/select-mobile/selectpicker",* >>> * "enketo-widget/geo/geopicker",* >>> * "enketo-widget/table/tablewidget",* >>> * "enketo-widget/radio/radiopicker",* >>> * "enketo-widget/time/timepicker-extended",* >>> * "enketo-widget/date/datepicker-extended",* >>> * "enketo-widget/datetime/datetimepicker-extended",* >>> * "enketo-widget/mediagrid/mediagridpicker",* >>> * "enketo-widget/select-likert/likertitem",* >>> * "enketo-widget/distress/distresspicker",* >>> * "enketo-widget/file/filepicker",* >>> * "enketo-widget/trigger/triggerwidget"* >>> * ],* >>> * "query parameter to pass to submission": "",* >>> * "redis": {* >>> * "main": {* >>> * "host": "127.0.0.1",* >>> * "port": "6379",* >>> * "password": #####* >>> * },* >>> >>> * "cache": {* >>> * "host": "127.0.0.1",* >>> * "port": "6379",* >>> * "password": #####* >>> * }* >>> * },* >>> * "logo": {* >>> * "source": >>> "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLT* >>> >>> ... >> >> -- >> You received this message because you are subscribed to the Google Groups >> "enketo-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to enketo-users+unsubscribe@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > *Revolutionizing data collection since 2012.* > > Enketo | LinkedIn > | GitHub > | Twitter > | Blog > > -- > You received this message because you are subscribed to the Google Groups > "ODK Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit-developers+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Ah yes, I see where this is coming from now. However, I think we should
leave* form authentication* security to just following the OpenRosa
Authentication API, which I don't think is part of this code.

The basic authentication in this particular piece of code seems to deal
with Enketo's* API communication* including* API authentication *using the
API token. If you'd like to ensure API authentication takes place securely
to protect Enketo's API token, the API call should never be made to http
which I think is currently not the case (and if it gets added, it would be
great if it could be bypassed to reduce the hurdle to start playing around
with Enketo Express and Aggregate).

Does this make sense?

ยทยทยท On Tue, Dec 16, 2014 at 11:44 AM, Mitch Sundt wrote: > > The reason for the check for https is that the request is using Basic > authentication -- that encodes the username and password *in plaintext* > on the request. > > i.e., Basic authentication should never be used outside of an https > transport. > > The code could be reworked to not supply any authentication if the > response URL specifies http. > > Does the Enketo-Express require authentication? > > > On Tue, Dec 16, 2014 at 8:23 AM, Martijn van de Rijdt wrote: > >> Ah, nice one! It looks like this whole code section could be improved a >> bit. The fact that it currently shows no error message to the user, should >> also be considered a bug. >> >> The way I would do this is: >> >> 1 check the http response code >> 2 if responseCode >= 200 or responseCode <300, parse the JSON response, >> check if it contains a "url" property (check validity of url if necessary, >> but I wouldn't) and redirect to this url >> 3 for any other responseCodes, parse the JSON response if exists, check >> if contains a "message" property and output this error to the user. If the >> response is empty or does not contain a "message" property output a generic >> error message. >> >> I don't do Java, so I hope somebody can do this work.... This will mean >> ODK Aggregate can be used with the brand new 100% free, open-source, >> easy-to-install Enketo Express app (which is still missing some features, >> but should become full-featured in a few months). >> >> Cheers, >> Martijn >> >> On Tue, Dec 16, 2014 at 9:03 AM, El Piqo wrote: >>> >>> I checked Catalina logs from ODK and they showed the same logs for >>> Enketo.org (which works) and my enketo-express which didn't work. >>> >>> Trying to understand more, I was looking the java code of >>> *EnketoApiHandlerServlet.java* and saw something that maybe its related >>> (ODK guys will know best) >>> >>> Line 107 checks if URL contains 'https'. In my enketo-express >>> installation this is not the case... and the responseURL variable >>> remains NULL. >>> >>> >>> https://code.google.com/p/opendatakit/source/browse/src/main/java/org/opendatakit/aggregate/servlet/EnketoApiHandlerServlet.java?repo=aggregate&name=v1_4&r=7da4343376658865e132283475b2cddb9dc65bba >>> >>> What do you think? >>> >>> >>> On Monday, December 15, 2014 7:12:58 PM UTC+1, martijn wrote: >>>> >>>> Hi Piqo, >>>> >>>> Enketo-Express: >>>> >>>> The API response and your Enketo express installation seems fine. If it >>>> doesn't load the form (on url http://192.168.2.140:13131/::YYYp in the >>>> browser), that will be because the form with ID "MY_FORM_NAME" cannot be >>>> reached or maybe it doesn't exist on *http://my_aggregate_subdomain.al:8083/ODKAggregate >>>> /formList*, >>>> or is protected. In all those cases, you should see a helpful error message >>>> telling you what's wrong when loading the URL in your browser. >>>> >>>> ODK Aggregate: >>>> >>>> You are definitely an Enketo-Express/Aggregate pioneer (thanks for >>>> that). Make sure you are using the latest version of Enketo-Express and >>>> that both ODK Aggregate and Enketo-express can communicate with each other >>>> (in your case, are on the same local network). I made sure the API of the >>>> old Enketo App and new Enketo App functions in the same way and return the >>>> same responses, so the apps could in theory be swapped without pain.... >>>> However, it seems you've run into an issue caused by some subtle difference >>>> in the responses/communication between the different Enketo apps and >>>> Aggregate. I don't yet know what's going on so I'm posting this here to see >>>> if anybody can help. I'm cross-posting this to the ODK-Dev forum. >>>> >>>> An API call to the old Enketo-legacy shows the following Aggegrate (v >>>> 1.4.3) log with the correct 200 response and a 46 Byte size from which the >>>> Enketo URL can be extracted: >>>> >>>> >>>> >>>> in the terminal with cURL this response is received: >>>> >>>> < HTTP/1.1 200 OK >>>> < Date: Mon, 15 Dec 2014 17:56:04 GMT >>>> * Server Apache/2.2.22 (Ubuntu) is not blacklisted >>>> < Server: Apache/2.2.22 (Ubuntu) >>>> < X-Powered-By: PHP/5.3.10-1ubuntu3.15 >>>> < Set-Cookie: __enketo_a=[removed this] >>>> <* Content-Length: 67* >>>> < Content-Type: application/json >>>> < >>>> { >>>> "url": "https:\/\/ocxat.enketo.org\/webform", >>>> "code": "200" >>>> * Connection #0 to host enketo.org left intact >>>> } >>>> >>>> >>>> The same API call to an enketo-express server shows the following log, >>>> also with a 200 response* but with a 0 B response* and therefore >>>> without an enketo url to redirect to. >>>> >>>> >>>> >>>> >>>> >>>> in the terminal with cURL the same API call shows this response (this >>>> response *does* have a body): >>>> >>>> < HTTP/1.1 200 OK >>>> * Server nginx/1.4.6 (Ubuntu) is not blacklisted >>>> < Server: nginx/1.4.6 (Ubuntu) >>>> < Date: Mon, 15 Dec 2014 17:54:42 GMT >>>> < Content-Type: application/json; charset=utf-8 >>>> < *Content-Length: 54* >>>> < Connection: keep-alive >>>> < X-Powered-By: Express >>>> < Vary: Accept-Encoding >>>> < >>>> { >>>> "url": "http://enk.to/::YYYH", >>>> "code": 200 >>>> * Connection #0 to host enk.to left intact >>>> } >>>> >>>> Any ideas, anybody? >>>> >>>> Cheers, >>>> Martijn >>>> >>>> >>>> On Monday, December 15, 2014 9:19:12 AM UTC-7, El Piqo wrote: >>>> >>>> Hi Martijn, >>>> the: >>>> *curl --user MY_API: -d >>>> "server_url=http://my_aggregate_subdomain.al:8083/ODKAggregate&form_id=MY_FORM_NAME >>>> " >>>> http://192.168.2.140:13131/api/v1/Survey >>>> * >>>> >>>> returns a: >>>> *{* >>>> * "url": "http://192.168.2.140:13131/::YYYp >>>> ",* >>>> * "code": 200* >>>> *}* >>>> >>>> I dont get what ::YYYP is, but does this mean that from enketo-express >>>> side everything is working properly? From ODK when I click on Enketo >>>> Webform nothing happens. (posting Headers below) >>>> Should I investigate the issue with ODK guys? BTW, has this been tried >>>> before? because I get the feeling I'm the first to try to connect these two >>>> (ODK 1.4.4 <-> Enketo-Express). Or perhaps just bad luck. :) >>>> >>>> >>>> *HEADERS on POST from ODK 1.4.4:* >>>> *-------------------------------* >>>> *Remote Address:192.168.2.140:8083 * >>>> *Request >>>> URL:http://my_aggregate_subdomain.com:8083/ODKAggregate/enk/enketoApiHandler >>>> * >>>> Request Method:POST >>>> Status Code:200 OK >>>> >>>> Request Headers >>>> Accept:*/* >>>> Accept-Encoding:gzip, deflate >>>> Accept-Language:en-US,en;q=0.8,sq;q=0.6 >>>> Authorization:Digest username="odk_username", >>>> realm="ODK 1.4.4 Aggregate", nonce="MTQxODY1ODU3MjczMTplNjBjMmVjOW >>>> M5ZmfIwZjNjMjYzMTZkMDZmZTI2NDIyOQ==", uri="/ODKAggregate/enk/enketoApiHandler", >>>> response="ce8c169bb06c3dfcbfb466cb4sfbd280d0", qop=auth, nc=000001c7, >>>> cnonce="78adddd3b5f592fb" >>>> Cache-Control:no-cache >>>> Connection:keep-alive >>>> Content-Length:123 >>>> Content-type:application/x-www-form-urlencoded >>>> .... >>>> Host:my_aggregate_subdomain.com:8083 >>>> Origin:http://my_aggregate_subdomain.com:8083 >>>> Pragma:no-cache >>>> Referer:http://my_aggregate_subdomain.com:8083/ >>>> ODKAggregate/Aggregate.html >>>> User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 >>>> (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 >>>> >>>> Form Data >>>> enketo_api_url:http://192.168.2.140:13131/api/v1/survey >>>> form_id:MY_FORM_NAME >>>> enketo_api_token:MY_API >>>> Response Headersview source >>>> Content-Length:0 >>>> Date:Mon, 15 Dec 2014 15:35:15 GMT >>>> Server:Apache-Coyote/1.1 >>>> *----------------------------* >>>> >>>> Thnx for the help, >>>> Piqo >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Tuesday, December 9, 2014 5:50:15 PM UTC+1, martijn wrote: >>>> >>>> /api/v1 and /api_v1 are the same by the way. The first is the preferred >>>> path for enketo-express (api_v1 was what enketo-legacy was using and >>>> therefore added as an alias to enketo-express). So corrected cURL snippet >>>> is: >>>> >>>> *curl --user MY_API: -d >>>> "server_url=http://192.168.2.140:8083/ODKAggregate >>>> &form_id >>>> =MY_FORM_NAME >>>> " http://192.168.2.140:13131/api/v1/ >>>> survey* >>>> >>>> On Tuesday, December 9, 2014 9:12:36 AM UTC-7, martijn wrote: >>>> >>>> Hi Piqo, >>>> >>>> All seems good now (if you want to protect your enketo-express >>>> installation even better in the future, the "server url" in config.json >>>> should be "http://192.168.2.140:8083/ODKAggregate >>>> "). In any case all >>>> API calls to Enketo should use that value for the server_url parameter. >>>> >>>> The only thing to clarify is how the API works. The API url is indeed >>>> http://192.168.2.140:13131/api/v1/ >>>> (or v2). However, this URL by itself just redirects to >>>> apidocs.enketo.org for a GET request and returns a 405 for any other >>>> request. When you try to communicate with Enketo (or any other REST API), >>>> you have to pick a* method* (POST or DELETE) and an *endpoint* based >>>> on what you'd like Enketo to do. The main API call (and the only one that >>>> is currently built-in to ODK Aggregate) is: POST /survey >>>> (but there are many others). >>>> >>>> So your curl snippet should be something like this (and this is what >>>> Aggregate when you click the Enketo button): >>>> >>>> *curl --user MY_API: -d >>>> "server_url=http://192.168.2.140:8083/ODKAggregate >>>> &form_id >>>> =MY_FORM_NAME >>>> " http://192.168.2.140:13131/api_v1/ >>>> survey* >>>> >>>> To illustrate the what the 2 parameters (server_url and form_id) in >>>> this API call do: >>>> >>>> 1. Enketo will go and visit the formList, by appending "/formList" >>>> to the server_url => http://192.168.2.140:8083/ODKAggregate >>>> >>>> /formList >>>> 2. It will do a search inside this formList to find the form >>>> resources belonging to the form_id you provided >>>> 3. It will now be able to load these resources >>>> 4. When submitting a record Enketo will know to submit to >>>> 'server_url' + '/submission' => http://192.168.2.140:8083/ >>>> ODKAggregate >>>> >>>> /submission >>>> >>>> Cheers, >>>> Martijn >>>> >>>> P.S. the GET methods are purely for developers who'd like to traverse >>>> the API in the browser (without cURL). API calls with this method have no >>>> practical use because a GET request should never alter the database, so it >>>> can only be used for surveys that were POSTed earlier. >>>> >>>> On Tuesday, December 9, 2014 3:28:15 AM UTC-7, El Piqo wrote: >>>> >>>> UPDATE >>>> the url >>>> http://192.168.2.140:8083/ODKAggregate/formList >>>> shows the my form: >>>> >>>> MY FORM NAME >>>> >>>> >>>> *In browser, http://my_domain (that points to >>>> 192.168.2.140):8083/ODKAggregate/formXml?formId=My_FORM_NAME* >>>> >>>> *downloads successfully the form.. * >>>> >>>> *When I try: curl --user MY_API: -d >>>> "server_url=http://192.168.2.140:8083/ODKAggregate/formXml?formId=MY_FORM_NAME >>>> " >>>> http://192.168.2.140:13131/api_v1/ * >>>> *{* >>>> * "code": 405,* >>>> * "message": "Not allowed"* >>>> } >>>> >>>> I get the same when I try the api/v2 URL. >>>> >>>> *Any idea would be appreciated, * >>>> *Thnx* >>>> >>>> On Tuesday, December 9, 2014 11:16:35 AM UTC+1, El Piqo wrote: >>>> >>>> Hi Martijn, >>>> >>>> ODK is installed in http://192.168.2.140:8083 >>>> >>>> *http://192.168.2.140:8083/formList >>>> *says *The requested resource >>>> (/formList) is not available.* I searched for troubleshooting it but >>>> nothing so far. >>>> >>>> I'm now a bit unclear about API url, isnt it >>>> http://192.168.2.140:13131/api/v2 >>>> >>>> *I tried api_v1 when curling the result was the same, but now i guess >>>> it is pointless since it is not able get the form properly.* >>>> >>>> >>>> My current configuration >>>> >>>> Enketo's Config.js (server url set to blank to accept from all servers, >>>> as suggested) >>>> >>>> *{* >>>> * "app name": "Enketo Smart Paper for KoBoCAT",* >>>> * "port": "13131",* >>>> * "linked form and data server": {* >>>> * "name": "Enketo",* >>>> * "server url": "",* >>>> * "api key": "MY_API_HERE"* >>>> * },* >>>> * "support": {* >>>> * "email": "info at kobotoolbox.org "* >>>> * },* >>>> * "google": {* >>>> * "analytics": {* >>>> * "ua": "",* >>>> * "domain": ""* >>>> * },* >>>> * "api key": ""* >>>> * },* >>>> * "maps": [ {* >>>> * "tiles": [ "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png >>>> " ],* >>>> * "attribution": "Map data ยฉ >>> \">OpenStreetMap contributors"* >>>> * } ],* >>>> * "widgets": [* >>>> * "enketo-widget/note/notewidget",* >>>> * "enketo-widget/select-desktop/selectpicker",* >>>> * "enketo-widget/select-mobile/selectpicker",* >>>> * "enketo-widget/geo/geopicker",* >>>> * "enketo-widget/table/tablewidget",* >>>> * "enketo-widget/radio/radiopicker",* >>>> * "enketo-widget/time/timepicker-extended",* >>>> * "enketo-widget/date/datepicker-extended",* >>>> * "enketo-widget/datetime/datetimepicker-extended",* >>>> * "enketo-widget/mediagrid/mediagridpicker",* >>>> * "enketo-widget/select-likert/likertitem",* >>>> * "enketo-widget/distress/distresspicker",* >>>> * "enketo-widget/file/filepicker",* >>>> * "enketo-widget/trigger/triggerwidget"* >>>> * ],* >>>> * "query parameter to pass to submission": "",* >>>> * "redis": {* >>>> * "main": {* >>>> * "host": "127.0.0.1",* >>>> * "port": "6379",* >>>> * "password": #####* >>>> * },* >>>> >>>> * "cache": {* >>>> * "host": "127.0.0.1",* >>>> * "port": "6379",* >>>> * "password": #####* >>>> * }* >>>> * },* >>>> * "logo": {* >>>> * "source": >>>> "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLT* >>>> >>>> ... >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "enketo-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to enketo-users+unsubscribe@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> *Revolutionizing data collection since 2012.* >> >> Enketo | LinkedIn >> | GitHub >> | Twitter >> | Blog >> >> -- >> You received this message because you are subscribed to the Google Groups >> "ODK Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit-developers+unsubscribe@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitchellsundt@gmail.com >

--

Revolutionizing data collection since 2012.

Enketo https://enketo.org/ | LinkedIn
http://www.linkedin.com/company/enketo-llc | GitHub
https://github.com/enketo | Twitter https://twitter.com/enketo
| Blog http://blog.enketo.org/

This is no longer an issue now with ODK Aggregate v1.4.5
https://code.google.com/p/opendatakit/wiki/AggregateReleaseNotes (see
point #9), thanks to the ODK team!

ยทยทยท On Tuesday, December 16, 2014 at 12:10:35 PM UTC-7, martijn wrote: > > Ah yes, I see where this is coming from now. However, I think we should > leave* form authentication* security to just following the OpenRosa > Authentication API, which I don't think is part of this code. > > The basic authentication in *this particular piece* of code seems to deal > with Enketo's* API communication* including* API authentication *using > the API token. If you'd like to ensure API authentication takes place > securely to protect Enketo's API token, the API call should never be made > to http which I think is currently not the case (and if it gets added, it > would be great if it could be bypassed to reduce the hurdle to start > playing around with Enketo Express and Aggregate). > > Does this make sense? > > On Tue, Dec 16, 2014 at 11:44 AM, Mitch Sundt wrote: >> >> The reason for the check for https is that the request is using Basic >> authentication -- that encodes the username and password *in plaintext* >> on the request. >> >> i.e., Basic authentication should never be used outside of an https >> transport. >> >> The code could be reworked to not supply any authentication if the >> response URL specifies http. >> >> Does the Enketo-Express require authentication? >> >> >> On Tue, Dec 16, 2014 at 8:23 AM, Martijn van de Rijdt > >>> Ah, nice one! It looks like this whole code section could be improved a >>> bit. The fact that it currently shows no error message to the user, should >>> also be considered a bug. >>> >>> The way I would do this is: >>> >>> 1 check the http response code >>> 2 if responseCode >= 200 or responseCode <300, parse the JSON response, >>> check if it contains a "url" property (check validity of url if necessary, >>> but I wouldn't) and redirect to this url >>> 3 for any other responseCodes, parse the JSON response if exists, check >>> if contains a "message" property and output this error to the user. If the >>> response is empty or does not contain a "message" property output a generic >>> error message. >>> >>> I don't do Java, so I hope somebody can do this work.... This will mean >>> ODK Aggregate can be used with the brand new 100% free, open-source, >>> easy-to-install Enketo Express app (which is still missing some features, >>> but should become full-featured in a few months). >>> >>> Cheers, >>> Martijn >>> >>> On Tue, Dec 16, 2014 at 9:03 AM, El Piqo wrote: >>>> >>>> I checked Catalina logs from ODK and they showed the same logs for >>>> Enketo.org (which works) and my enketo-express which didn't work. >>>> >>>> Trying to understand more, I was looking the java code of >>>> *EnketoApiHandlerServlet.java* and saw something that maybe its >>>> related (ODK guys will know best) >>>> >>>> Line 107 checks if URL contains 'https'. In my enketo-express >>>> installation this is not the case... and the responseURL variable >>>> remains NULL. >>>> >>>> >>>> https://code.google.com/p/opendatakit/source/browse/src/main/java/org/opendatakit/aggregate/servlet/EnketoApiHandlerServlet.java?repo=aggregate&name=v1_4&r=7da4343376658865e132283475b2cddb9dc65bba >>>> >>>> What do you think? >>>> >>>> >>>> On Monday, December 15, 2014 7:12:58 PM UTC+1, martijn wrote: >>>>> >>>>> Hi Piqo, >>>>> >>>>> Enketo-Express: >>>>> >>>>> The API response and your Enketo express installation seems fine. If >>>>> it doesn't load the form (on url http://192.168.2.140:13131/::YYYp in >>>>> the browser), that will be because the form with ID "MY_FORM_NAME" cannot >>>>> be reached or maybe it doesn't exist on *http://my_aggregate_subdomain.al:8083/ODKAggregate >>>>> /formList*, >>>>> or is protected. In all those cases, you should see a helpful error message >>>>> telling you what's wrong when loading the URL in your browser. >>>>> >>>>> ODK Aggregate: >>>>> >>>>> You are definitely an Enketo-Express/Aggregate pioneer (thanks for >>>>> that). Make sure you are using the latest version of Enketo-Express and >>>>> that both ODK Aggregate and Enketo-express can communicate with each other >>>>> (in your case, are on the same local network). I made sure the API of the >>>>> old Enketo App and new Enketo App functions in the same way and return the >>>>> same responses, so the apps could in theory be swapped without pain.... >>>>> However, it seems you've run into an issue caused by some subtle difference >>>>> in the responses/communication between the different Enketo apps and >>>>> Aggregate. I don't yet know what's going on so I'm posting this here to see >>>>> if anybody can help. I'm cross-posting this to the ODK-Dev forum. >>>>> >>>>> An API call to the old Enketo-legacy shows the following Aggegrate (v >>>>> 1.4.3) log with the correct 200 response and a 46 Byte size from which the >>>>> Enketo URL can be extracted: >>>>> >>>>> >>>>> >>>>> in the terminal with cURL this response is received: >>>>> >>>>> < HTTP/1.1 200 OK >>>>> < Date: Mon, 15 Dec 2014 17:56:04 GMT >>>>> * Server Apache/2.2.22 (Ubuntu) is not blacklisted >>>>> < Server: Apache/2.2.22 (Ubuntu) >>>>> < X-Powered-By: PHP/5.3.10-1ubuntu3.15 >>>>> < Set-Cookie: __enketo_a=[removed this] >>>>> <* Content-Length: 67* >>>>> < Content-Type: application/json >>>>> < >>>>> { >>>>> "url": "https:\/\/ocxat.enketo.org\/webform", >>>>> "code": "200" >>>>> * Connection #0 to host enketo.org left intact >>>>> } >>>>> >>>>> >>>>> The same API call to an enketo-express server shows the following log, >>>>> also with a 200 response* but with a 0 B response* and therefore >>>>> without an enketo url to redirect to. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> in the terminal with cURL the same API call shows this response (this >>>>> response *does* have a body): >>>>> >>>>> < HTTP/1.1 200 OK >>>>> * Server nginx/1.4.6 (Ubuntu) is not blacklisted >>>>> < Server: nginx/1.4.6 (Ubuntu) >>>>> < Date: Mon, 15 Dec 2014 17:54:42 GMT >>>>> < Content-Type: application/json; charset=utf-8 >>>>> < *Content-Length: 54* >>>>> < Connection: keep-alive >>>>> < X-Powered-By: Express >>>>> < Vary: Accept-Encoding >>>>> < >>>>> { >>>>> "url": "http://enk.to/::YYYH", >>>>> "code": 200 >>>>> * Connection #0 to host enk.to left intact >>>>> } >>>>> >>>>> Any ideas, anybody? >>>>> >>>>> Cheers, >>>>> Martijn >>>>> >>>>> >>>>> On Monday, December 15, 2014 9:19:12 AM UTC-7, El Piqo wrote: >>>>> >>>>> Hi Martijn, >>>>> the: >>>>> *curl --user MY_API: -d >>>>> "server_url=http://my_aggregate_subdomain.al:8083/ODKAggregate&form_id=MY_FORM_NAME >>>>> " >>>>> http://192.168.2.140:13131/api/v1/Survey >>>>> * >>>>> >>>>> returns a: >>>>> *{* >>>>> * "url": "http://192.168.2.140:13131/::YYYp >>>>> ",* >>>>> * "code": 200* >>>>> *}* >>>>> >>>>> I dont get what ::YYYP is, but does this mean that from enketo-express >>>>> side everything is working properly? From ODK when I click on Enketo >>>>> Webform nothing happens. (posting Headers below) >>>>> Should I investigate the issue with ODK guys? BTW, has this been tried >>>>> before? because I get the feeling I'm the first to try to connect these two >>>>> (ODK 1.4.4 <-> Enketo-Express). Or perhaps just bad luck. :) >>>>> >>>>> >>>>> *HEADERS on POST from ODK 1.4.4:* >>>>> *-------------------------------* >>>>> *Remote Address:192.168.2.140:8083 * >>>>> *Request >>>>> URL:http://my_aggregate_subdomain.com:8083/ODKAggregate/enk/enketoApiHandler >>>>> * >>>>> Request Method:POST >>>>> Status Code:200 OK >>>>> >>>>> Request Headers >>>>> Accept:*/* >>>>> Accept-Encoding:gzip, deflate >>>>> Accept-Language:en-US,en;q=0.8,sq;q=0.6 >>>>> Authorization:Digest username="odk_username", >>>>> realm="ODK 1.4.4 Aggregate", nonce="MTQxODY1ODU3MjczMTplNjBjMmVjOW >>>>> M5ZmfIwZjNjMjYzMTZkMDZmZTI2NDIyOQ==", uri="/ODKAggregate/enk/enketoApiHandler", >>>>> response="ce8c169bb06c3dfcbfb466cb4sfbd280d0", qop=auth, nc=000001c7, >>>>> cnonce="78adddd3b5f592fb" >>>>> Cache-Control:no-cache >>>>> Connection:keep-alive >>>>> Content-Length:123 >>>>> Content-type:application/x-www-form-urlencoded >>>>> .... >>>>> Host:my_aggregate_subdomain.com:8083 >>>>> Origin:http://my_aggregate_subdomain.com:8083 >>>>> Pragma:no-cache >>>>> Referer:http://my_aggregate_subdomain.com:8083/ >>>>> ODKAggregate/Aggregate.html >>>>> User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 >>>>> (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 >>>>> >>>>> Form Data >>>>> enketo_api_url:http://192.168.2.140:13131/api/v1/survey >>>>> form_id:MY_FORM_NAME >>>>> enketo_api_token:MY_API >>>>> Response Headersview source >>>>> Content-Length:0 >>>>> Date:Mon, 15 Dec 2014 15:35:15 GMT >>>>> Server:Apache-Coyote/1.1 >>>>> *----------------------------* >>>>> >>>>> Thnx for the help, >>>>> Piqo >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Tuesday, December 9, 2014 5:50:15 PM UTC+1, martijn wrote: >>>>> >>>>> /api/v1 and /api_v1 are the same by the way. The first is the >>>>> preferred path for enketo-express (api_v1 was what enketo-legacy was using >>>>> and therefore added as an alias to enketo-express). So corrected cURL >>>>> snippet is: >>>>> >>>>> *curl --user MY_API: -d >>>>> "server_url=http://192.168.2.140:8083/ODKAggregate >>>>> &form_id >>>>> =MY_FORM_NAME >>>>> " http://192.168.2.140:13131/api/v1/ >>>>> survey* >>>>> >>>>> On Tuesday, December 9, 2014 9:12:36 AM UTC-7, martijn wrote: >>>>> >>>>> Hi Piqo, >>>>> >>>>> All seems good now (if you want to protect your enketo-express >>>>> installation even better in the future, the "server url" in config.json >>>>> should be "http://192.168.2.140:8083/ODKAggregate >>>>> "). In any case all >>>>> API calls to Enketo should use that value for the server_url parameter. >>>>> >>>>> The only thing to clarify is how the API works. The API url is indeed >>>>> http://192.168.2.140:13131/api/v1/ >>>>> (or v2). However, this URL by >>>>> itself just redirects to apidocs.enketo.org for a GET request and >>>>> returns a 405 for any other request. When you try to communicate with >>>>> Enketo (or any other REST API), you have to pick a* method* (POST or >>>>> DELETE) and an *endpoint* based on what you'd like Enketo to do. The >>>>> main API call (and the only one that is currently built-in to ODK >>>>> Aggregate) is: POST /survey (but >>>>> there are many others). >>>>> >>>>> So your curl snippet should be something like this (and this is what >>>>> Aggregate when you click the Enketo button): >>>>> >>>>> *curl --user MY_API: -d >>>>> "server_url=http://192.168.2.140:8083/ODKAggregate >>>>> &form_id >>>>> =MY_FORM_NAME >>>>> " http://192.168.2.140:13131/api_v1/ >>>>> survey* >>>>> >>>>> To illustrate the what the 2 parameters (server_url and form_id) in >>>>> this API call do: >>>>> >>>>> 1. Enketo will go and visit the formList, by appending "/formList" >>>>> to the server_url => http://192.168.2.140:8083/ODKAggregate >>>>> >>>>> /formList >>>>> 2. It will do a search inside this formList to find the form >>>>> resources belonging to the form_id you provided >>>>> 3. It will now be able to load these resources >>>>> 4. When submitting a record Enketo will know to submit to >>>>> 'server_url' + '/submission' => http://192.168.2.140:8083/ >>>>> ODKAggregate >>>>> >>>>> /submission >>>>> >>>>> Cheers, >>>>> Martijn >>>>> >>>>> P.S. the GET methods are purely for developers who'd like to traverse >>>>> the API in the browser (without cURL). API calls with this method have no >>>>> practical use because a GET request should never alter the database, so it >>>>> can only be used for surveys that were POSTed earlier. >>>>> >>>>> On Tuesday, December 9, 2014 3:28:15 AM UTC-7, El Piqo wrote: >>>>> >>>>> UPDATE >>>>> the url >>>>> http://192.168.2.140:8083/ODKAggregate/formList >>>>> shows the my form: >>>>> >>>>> MY FORM NAME >>>>> >>>>> >>>>> *In browser, http://my_domain (that points to >>>>> 192.168.2.140):8083/ODKAggregate/formXml?formId=My_FORM_NAME* >>>>> >>>>> *downloads successfully the form.. * >>>>> >>>>> *When I try: curl --user MY_API: -d >>>>> "server_url=http://192.168.2.140:8083/ODKAggregate/formXml?formId=MY_FORM_NAME >>>>> " >>>>> http://192.168.2.140:13131/api_v1/ * >>>>> *{* >>>>> * "code": 405,* >>>>> * "message": "Not allowed"* >>>>> } >>>>> >>>>> I get the same when I try the api/v2 URL. >>>>> >>>>> *Any idea would be appreciated, * >>>>> *Thnx* >>>>> >>>>> On Tuesday, December 9, 2014 11:16:35 AM UTC+1, El Piqo wrote: >>>>> >>>>> Hi Martijn, >>>>> >>>>> ODK is installed in http://192.168.2.140:8083 >>>>> >>>>> *http://192.168.2.140:8083/formList >>>>> *says *The requested resource >>>>> (/formList) is not available.* I searched for troubleshooting it but >>>>> nothing so far. >>>>> >>>>> I'm now a bit unclear about API url, isnt it >>>>> http://192.168.2.140:13131/api/v2 >>>>> >>>>> *I tried api_v1 when curling the result was the same, but now i guess >>>>> it is pointless since it is not able get the form properly.* >>>>> >>>>> >>>>> My current configuration >>>>> >>>>> Enketo's Config.js (server url set to blank to accept from all >>>>> servers, as suggested) >>>>> >>>>> *{* >>>>> * "app name": "Enketo Smart Paper for KoBoCAT",* >>>>> * "port": "13131",* >>>>> * "linked form and data server": {* >>>>> * "name": "Enketo",* >>>>> * "server url": "",* >>>>> * "api key": "MY_API_HERE"* >>>>> * },* >>>>> * "support": {* >>>>> * "email": "info at kobotoolbox.org "* >>>>> * },* >>>>> * "google": {* >>>>> * "analytics": {* >>>>> * "ua": "",* >>>>> * "domain": ""* >>>>> * },* >>>>> * "api key": ""* >>>>> * },* >>>>> * "maps": [ {* >>>>> * "tiles": [ "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png >>>>> " ],* >>>>> * "attribution": "Map data ยฉ >>>> \">OpenStreetMap contributors"* >>>>> * } ],* >>>>> * "widgets": [* >>>>> * "enketo-widget/note/notewidget",* >>>>> * "enketo-widget/select-desktop/selectpicker",* >>>>> * "enketo-widget/select-mobile/selectpicker",* >>>>> * "enketo-widget/geo/geopicker",* >>>>> * "enketo-widget/table/tablewidget",* >>>>> * "enketo-widget/radio/radiopicker",* >>>>> * "enketo-widget/time/timepicker-extended",* >>>>> * "enketo-widget/date/datepicker-extended",* >>>>> * "enketo-widget/datetime/datetimepicker-extended",* >>>>> * "enketo-widget/mediagrid/mediagridpicker",* >>>>> * "enketo-widget/select-likert/likertitem",* >>>>> * "enketo-widget/distress/distresspicker",* >>>>> * "enketo-widget/file/filepicker",* >>>>> * "enketo-widget/trigger/triggerwidget"* >>>>> * ],* >>>>> * "query parameter to pass to submission": "",* >>>>> * "redis": {* >>>>> * "main": {* >>>>> * "host": "127.0.0.1",* >>>>> * "port": "6379",* >>>>> * "password": #####* >>>>> * },* >>>>> >>>>> * "cache": {* >>>>> * "host": "127.0.0.1",* >>>>> * "port": "6379",* >>>>> * "password": #####* >>>>> * }* >>>>> * },* >>>>> * "logo": {* >>>>> * "source": >>>>> "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLT* >>>>> >>>>> ... >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "enketo-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to enketo-users+unsubscribe@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> *Revolutionizing data collection since 2012.* >>> >>> Enketo | LinkedIn >>> | GitHub >>> | Twitter >>> | Blog >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "ODK Developers" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to opendatakit-developers+unsubscribe@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> -- >> Mitch Sundt >> Software Engineer >> University of Washington >> mitchellsundt@gmail.com >> > > -- > *Revolutionizing data collection since 2012.* > > Enketo | LinkedIn > | GitHub > | Twitter > | Blog >

--

Revolutionizing data collection since 2012.

Enketo https://enketo.org/ | LinkedIn
http://www.linkedin.com/company/enketo-llc | GitHub
https://github.com/enketo | Twitter https://twitter.com/enketo
| Blog http://blog.enketo.org/