As we work on OC4 we are looking to do some changes to the current account & authentication workflows.
Current state of affairs
OC creates an enketo account for a specific protocol by calling this endpoint:
endpoint: /account (POST)
description: /account endpoint adds a new account if it does not already exist, and returns the new or existing account.
body:
{"server_url":"http://host/STUDY_OID", "api_key":"1234"}
OC calls /survey it passes the api_key=1234
& {server_url=value&form_id=CRF_OID}. Enketo returns a unique form URL associated with account(api_key=1234)
A user then loads the form, enketo makes /formList, /DownloadMetadata, etc. calls to the server_url associated with account(api_key=1234)
From @kkrumlian on April 28, 2017 18:19
As we work on OC4 we are looking to do some changes to the current account & authentication workflows.
Current state of affairs
New Workflow
Copied from original issue: kobotoolbox/enketo-express#733