Skip to content

Fully implement OpenRosa Form Discovery API #1

New issue

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

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

Already on GitHub? # to your account

Closed
MartijnR opened this issue Nov 25, 2016 · 7 comments
Closed

Fully implement OpenRosa Form Discovery API #1

MartijnR opened this issue Nov 25, 2016 · 7 comments

Comments

@MartijnR
Copy link

MartijnR commented Nov 25, 2016

Nice project!

I didn't check the code, but it seems that the OpenRosa Form Discovery API is not implemented. I only see a very old version that Aggregate supports for backwards compatibility (if I remember correctly) of ancient versions of ODK Collect. In ODK Aggregate the correct version is shown if you supply the special 'X-OpenRosa-Version: 1.0' header.

Ancient: curl https://opendatakit.appspot.com/formList
Correct: curl -H "X-OpenRosa-Version: 1.0" https://opendatakit.appspot.com/formList

I'd recommend doing the same as Ona and KoboToolbox and only implement the correct /formList, unless you need support for ancient ODK Collect versions, see e.g. https://kc.kobotoolbox.org/martijnr/formList. Note they show this listing even if the special header is not supplied - very helpful for data-collection-client developers such as myself.

Once this is implemented, I'd be happy to link your demo site with odk.enke.to, so you can view forms, and submit data, in the browser with Enketo. You'd just have to replace the demo forms with modern ones created with XLSForm/Pyxform (many of the ones currently hosted don't have the correct syntax, or have rather exotic syntax that is not supported (any longer) in Enketo).

@MartijnR
Copy link
Author

In case this is helpful, here is a JavaScript implementation of /formList (and also of the XFormsManifest): https://github.com/enketo/centro/blob/master/app/controllers/formlist.js

@JhulFramework
Copy link
Owner

Yes, i'll do that , thank you

@JhulFramework
Copy link
Owner

JhulFramework commented Nov 27, 2016

implemented formListAPI can you please check.
My test server is going to down in 2 months(webhosting is going to expire), so i dont know if you would like to add it.
Do you know any free webhost, cant use google app engine , becuase i have not tried storing data there using PHP

@MartijnR
Copy link
Author

Will do!

Don't know about free hosting for PHP with a database backend. I like DigitalOcean but that's $5/month at least.

@MartijnR
Copy link
Author

Seems to work nicely! 👍 This is a form hosted on your server, run in Enketo: https://odk.enke.to/::YYYc.

I'll send you an email with the API key in case you want to play around with this.

To support forms with media (such as the "Birds" form) or external data files, you'd also have to implement the manifestUrl and publish the manifest.

@MartijnR
Copy link
Author

Actually, I don't seem to have access to your email address. Just send me an email if you want this.

martijn @ enketo.org

@JhulFramework
Copy link
Owner

Thanks,
It will be helpful for testing

Right now i have not implemented many features, which i plan to.

I have sent you a mail, here's my email id 1D3N717Y12 @ gmail.com

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants