Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement OpenFn adaptor for ODK #534

Open
4 tasks
christad92 opened this issue Apr 28, 2024 · 1 comment
Open
4 tasks

Implement OpenFn adaptor for ODK #534

christad92 opened this issue Apr 28, 2024 · 1 comment
Assignees

Comments

@christad92
Copy link

christad92 commented Apr 28, 2024

Using the ODK API reference, we want to provide an ODK adaptor on OpenFn with the following capability:

  • Authenticate using email and password to generate a session token which will be used to authorize other actions
  • Include HTTP for generic get and post methods
  • Helper function getForms specifically for the list forms endpoint: GET /v1/projects/{projectId}/forms
  • Helper function getSubmissions specifically for the list forms endpoint: GET /v1/projects/{projectId}/forms/{xmlFormId}/submissions

FYI Taylor really wants to be able to demo getSubmissions to our ODK contacts.

API Docs: https://docs.getodk.org/central-api-authentication/
Access: LastPass "ODK Sandbox" (ask @taylor if you need help getting in!)
About ODK: https://getodk.org/

Note that there is already a form with a submission in there.

Potentially useful sample code:

const options = {
  url: `${bundle.authData.url}/v1/projects/${bundle.inputData.projectId}/forms/${bundle.inputData.xmlFormId}.svc/${bundle.inputData.table}`,
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${bundle.authData.token}`
  },
  params: {
      '$top': bundle.inputData.top
  },
}

Client considerations

Taylor wants this for an upcoming demo, but no set timeline or major urgency here. This adaptor will probably look very similar to our CommCare and Kobo adaptors, because this is a very similar mobile data collection app.

Toggl

adaptors

@aleksa-krolls
Copy link
Member

@christad92 Confirming we can add this ODK adaptor for Hunter's sprint next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants