I am trying to use the Submission API, ultimately, to update a case by submitting a form with new data. However, at the moment, I can't see any of my submissions I pushed through the API.
I am sending the post with: curl -F "xml_submission_file=@form.xml" "https://www.commcarehq.org/a/PROJECT/receiver/" -u username@domain.com
Upon completion, I get the success message: <OpenRosaResponse xmlns="http://openrosa.org/http/response"><message nature="submit_success"> √ </message></OpenRosaResponse>
This form has one field called mresult and I set the value in the xml file such as: <mresult value="test" />
The rest of the XML contents I copied from the "Edit Form's Source XML" window.
However, when I run reports on this form (data reports), I see zero submissions for this form.
In CommCareHQ's reports, do you see your data in the "Raw Forms, Errors & Duplicates" page? Does that view map your form properly to an existing form type?
I do see it actually - but no, it says it's an unknown form type. It also doesn't have my username as being the one submitted. How can I associate it to the right form?
I think the confusion may be in what XML you submitted.
You mentioned you copied the XML from the "view source xml" section. That's the definition of the XForm structure, rather than the result of the xform being filled out. You likely want to use a copy of the form which was submitted from Web Apps or Live Preview as the template you are using for the change you submit.