I’m trying to use the Submission API to populate a project with some forms and cases. So far, all attempts have yielded either no response or a 404 response and no forms have been submitted. Also, no raw forms or errors appear for these attempts.
For example, the command:
curl -F "xml_submission_file=@TestRegistrationForm1.xml" "https://www.commcarehq.org/a/<PROJECT>/<APPLICATION ID>/receiver" -u <USER NAME>
yields a 404 error.
I have successfully synced forms from the mobile app.
I’m using CommCare HQ with a Community Plan and a project with the COVID-19 template application. I have tried both the web user and a mobile worker user name with the same results.
Does the Submission API work under the Community Plan? If so, does anyone see an error in my curl command? Thanks.
Unfortunately, API Access is available to Pro plans and above - link.
To support organizations and governments with their ongoing COVID-19 response efforts, Dimagi is providing free resources for our open-source digital health platform, CommCare. I would suggest checking out our documentation with regards to covid-19 and the option for a Pro Bono Subscription, linked below.
CommCare for COVID-19 - https://confluence.dimagi.com/display/commcarepublic/CommCare+for+COVID-19
While Dev’s right that most APIs are available on a Pro plan only, it should be possible to use and test the Submission API on a community plan until you are able to get Pro Bono access.
Assuming you are replacing the “” and “<APPLICATION_D>” variables, I think the issue is that receiver should come before the application ID in the url.
Thanks for both of your replies.
Moving receiver before the <APPLICATION_ID> changed the behavior to no response rather than a 404, so that could be an improvement. However, CommCare HQ still doesn’t show any successful submission.
I will see if I can get a Pro Bono Subscription. My goal is to learn the CommCare software so I can be an effective open source contributor and I don’t represent any organization that could use CommCare to help end users. I would understand if that use care doesn’t qualify for a Pro Bono Subscription and, in any event, there are many ways for me to keep learning without requiring the Submission API.
Sorry I missed this. What’s the status code of the “non-response” you’re getting?
In that case, no error message appeared and I think the Unix status code was 0.
I did get a Pro Bono account and the submission API now works (using receiver/<APPLICATION_ID> in that order), so my problem is solved.
Thanks for the help.