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

Add form creation #60

Closed
yanokwa opened this issue Mar 10, 2024 · 1 comment · Fixed by #72
Closed

Add form creation #60

yanokwa opened this issue Mar 10, 2024 · 1 comment · Fixed by #72
Milestone

Comments

@yanokwa
Copy link
Member

yanokwa commented Mar 10, 2024

I'd love to be able to call a method where I pass in a projectID and a path to an file (XLS or XML) along with ignoreWarnings and publish parameters to programmatically create a form.

I'd expect both of these parameters to default to true because that's my expectation of a form publishing integration, but I'm open to having my mind changed.

I expect the method to set the correct Content-Type based on the file at the path. As we do with pyxform-http, we should set an X-XlsForm-FormId-Fallback to a uuid.

@lognaturel
Copy link
Member

Endpoint docs at https://docs.getodk.org/central-api-form-management/#creating-a-new-form

I agree with defaulting ignoreWarnings and publish to true. I don't think we should expose publish at all for now, and we can add it later if it's needed. I think it can be helpful to get warnings, maybe just as a list?

I think ideally there would be one required parameter: a file path. That could be set to an xml, xls or xlsx file. The function would detect the file type and set the Content-Type and X-XlsForm-FormId-Fallback headers appropriately.

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

Successfully merging a pull request may close this issue.

2 participants