Project ID in submission XML

Hello!

I’m a backend engineer working on integrating ODK Central with an internal data pipeline. We ingest raw submission XML from the Retrieving Submission XML endpoint. Because of some of our system constraints, we need to be able to extract the following information directly from the submission XML:

  • Project ID
  • Form ID
  • Submission instance ID

We are able to get the form ID and submission instance ID from the XML; however, I do not immediately see a way to get the project ID from the XML.

Is there a metadata field available in the submission XML that contains the project ID?
Alternatively, is there a recommended way to structure or configure the form so that the project ID can be injected into the submission XML?

Thanks for the support!

Julie

You likely already know this, but the URL you use to fetch a submission already includes the project ID.

If you need the project ID inside the submission itself, you can add a calculate question to the form so it stays hidden from users. Then before pulling existing submissions, you can edit them via API and add the appropriate project ID. For new submissions, you can update the form definition to set the value directly as part of the form design.

You likely already know this, but the URL you use to fetch a submission already includes the project ID.

Yes, this is a bit of an odd request for that reason. We have an idea for a workaround for our system, but we’d have a preference to keep the processing consistent with other integrations which utilize webhooks.

you can add a calculate question to the form . . . you can edit them via API

Thanks for the idea! Let me see how that looks for our use case.