{"action":"closed","issue":{"url":"https://api.github.com/repos/onaio/onadata/issues/304","labels_url":"https://api.github.com/repos/onaio/onadata/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/onaio/onadata/issues/304/comments","events_url":"https://api.github.com/repos/onaio/onadata/issues/304/events","html_url":"https://github.com/onaio/onadata/issues/304","id":34587633,"number":304,"title":"Use Enketo API for all webform URLs (no hardcoded webform urls)","user":{"login":"MartijnR","id":627350,"avatar_url":"https://avatars.githubusercontent.com/u/627350?v=3","gravatar_id":"","url":"https://api.github.com/users/MartijnR","html_url":"https://github.com/MartijnR","followers_url":"https://api.github.com/users/MartijnR/followers","following_url":"https://api.github.com/users/MartijnR/following{/other_user}","gists_url":"https://api.github.com/users/MartijnR/gists{/gist_id}","starred_url":"https://api.github.com/users/MartijnR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartijnR/subscriptions","organizations_url":"https://api.github.com/users/MartijnR/orgs","repos_url":"https://api.github.com/users/MartijnR/repos","events_url":"https://api.github.com/users/MartijnR/events{/privacy}","received_events_url":"https://api.github.com/users/MartijnR/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-05-29T20:02:39Z","updated_at":"2015-04-16T12:30:47Z","closed_at":"2015-04-16T12:30:47Z","body":"Simplify the Enketo settings. You really only need 2 settings: `enketo_api_url` and `enketo_api_token`. \r\n\r\nThis means removing the hardcoded webform urls from settings.py and use the Enketo API to always request the webform url.  This will make OnaData compatible with a new Enketo app I'm currently developing. The new app will use the exact same API but a very different (muuuuuch nicer) URL structure.\r\n\r\nIf performance is a concern, maybe consider using the [/survey/all]( http://apidocs.enketo.org/#/post-all-survey) endpoint upon page load which would then allow you to redirect to the approriate webform URL immediately when a user clicks a button. It may even be worth caching the response for the next page load.\r\n"}}