How to retrieve the schema of a form through the API


I was wondering, is there a way to retrieve information about the schema of a CommCare form through the API? With schema I basically mean which fields are part of the form, and the data type of each field.

I am aware of the Form data endpoint, which contains the form data and some basic metadata about the form. It does not, however, contain the form fields/schema.

I know there is probably something which can be done through XForms parsing, but I was hoping to avoid that and stick with JSON.

I also know that you can set up an OData feed and parse the $metadata endpoint response. This is a feasible option but requires an OData feed to be set up for every form and is also only accessible on the Advanced plan.

Any insight is appreciated!



Hey Lars,

I believe most of this information is available through the Application Structure API

Thanks @czue! I think that should provide the information I need.