Required parameter form ID xml attribute missing when posting to REST/ODK Central

To investigate:

I try to build a large database by uploading via REST/POST Using Postman.
The form has only one field, I have added one entry manually and can retrieve it with:

Response is:

<?xml version='1.0' ?>
<data id="JaNein" version="vicPu2GyFeYYPzuNeVfB3R" xmlns:ev="" xmlns:orx="" xmlns:xsd="" xmlns:odk="" xmlns:h="" xmlns:jr="">

I tried to upload a clone as follows:

with a file POST load following

<?xml version="1.0"?>
<data id="JaNein" version="vicPu2GyFeYYPzuNeVfB3R" xmlns:ev="" xmlns:orx="" xmlns:xsd="" xmlns:odk=""
      xmlns:h="" xmlns:jr="">

Note that I have incremented the uuid (3000->3001), but this is pure guesswork, because I did not find documentation on orx in Central.

This gives an error:

    "message": "Required parameter form ID xml attribute missing.",
    "code": 400.2,
    "details": {
        "field": "form ID xml attribute"

At a first glance, I don't see anything unusual about the XML you're sending. Could you also share the XML of the form?

For more information about the structure of the XML, take a look at the ODK XForms specification. There you'll find a note about orx, as well as a description of instanceID.

Thanks Matthew, I had seen the specification but did not fully get what it means in this context. So I simply copied it from the Submit docs.

<?xml version="1.0"?>
<h:html xmlns="" xmlns:ev="" xmlns:h="" xmlns:jr="" xmlns:odk="" xmlns:orx=""
    <model odk:xforms-version="1.0.0">
        <translation default="true()" lang="Deutsch (de)">
          <text id="/data/janein:label">
            <value>Ja Nein</value>
          <text id="/data/janein:hint">
            <value>Ja oder nein</value>
          <text id="/data/janein/ja:label">
          <text id="/data/janein/nein:label">
        <data id="JaNein" version="vicPu2GyFeYYPzuNeVfB3R">
      <bind nodeset="/data/janein" required="false()" type="string"/>
      <bind jr:preload="uid" nodeset="/data/meta/instanceID" readonly="true()" type="string"/>
  <h:body class="theme-grid pages">
    <select1 appearance="list-label" ref="/data/janein">
      <label ref="jr:itext('/data/janein:label')"/>
      <hint ref="jr:itext('/data/janein:hint')"/>
        <label ref="jr:itext('/data/janein/ja:label')"/>
        <label ref="jr:itext('/data/janein/nein:label')"/>

I seem to be able to POST the form and submission without error when I use curl. That makes me think that it's not an issue with the XML or with Central's parsing of the XML, but rather with getting the XML to Central. Do you have better luck when you use curl to POST? Maybe Postman is sending the XML in a way that Central doesn't understand? (Maybe it's the difference between sending a string and sending a file?)

1 Like

Bummer! Sending it as string with Postman

    "instanceId": "uuid:f7bb7a38-c71d-423f-859e-3ad70a6d3002",
    "submitterId": 34,
    "deviceId": null,
    "createdAt": "2020-07-08T19:15:51.583Z",
    "updatedAt": null

Thanks. You saved my night