-
Notifications
You must be signed in to change notification settings - Fork 10
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
Kobotoolbox: New API signatures #943
Comments
Understanding the kobo APIkobo's v2 API is called KPI See source at: https://github.com/kobotoolbox/kpi
it acutally looks like the v2 JSON API mirrors the app APIs. So maybe the way to go is to sign into kobo and make a list of the APIs there
but I don't actually see any of that stuff in the URL Asset query syntax: https://github.com/kobotoolbox/kpi/blob/main/kpi/utils/query_parser/query_parser.py OH LOOK WHAT IS THIS GORGEOUSNESS: https://eu.kobotoolbox.org/api/v2/assets/ |
Ok based on the above, here's a summary of the kobo API:
I don't anticipate much need to create or deploy forms. More likely we want to get submissions and maybe stats |
So I'm thinking maybe we just have
The question is; how complicated will Also, actually, for most of those things formId is needed. So maybe the current API is right, and we need:
And the other stuff you have to use generic http get. The primary benefits of this structure are:
|
@aleksa-krolls this is ready to roll out next sprint! I went through a bit of a process here: in the end the new API is just a cleaned up variant of the existing one. Still a breaking release but it's tweaks, rather than a rethink :) |
Thanks @josephjclark ! Will review and come back to you :) |
hey @hunterachieng moving this into your Ready backlog for this sprint, as it looks like you'll have time and it builds on the other kobo issues |
also @hunterachieng please remember to add an estimate before starting work, and schedule time to discuss with Joe as needed - thanks! |
@aleksa-krolls this is noted. Thank you |
For background see #603
New API
Optimised for getting form submisisons
Notes:
{start, limit, query}
, seehttps://eu.kobotoolbox.org/api/v2/assets/<uuid>/data/
?format=json
in the query URLs. The accept header might work too??q=asset_type:survey
.Old API
For the record the current adaptor is not so different after all:
Pagination
pagination is really hard in openfn if the adpator doesn't support it. We provide zero looping capability.
So we should automatically handle pagination to handle all data, unless
offset
orlimit
is provided (in which case we assume users will handle their own pagination)The text was updated successfully, but these errors were encountered: