App Structure as JSON via API

Hello here,
Can I get the App structure via an api? I would like to get a json object that looks like:

{
   "app_id": ''some_app_id",
   "modules":     [
                            {
                                  "name": "HH Registration"
                                  "id": "some_module_id",
                                  "forms": [
                                                 { 

                                                  "name": "Registration",
                                                  "id":  "some_form_id"
                                                 },
                                             ....
                                         ]
                              },
                        ....
                      ]
}

Hi @Chaiwa_Berian !
You can indeed get the app structure with this endpoint: Application Structure API - CommCare Public - Global Site

Hope that helps!
-Farid

1 Like

Thank you @Farid_Rener , exactly what I needed. Always helpful. Good to learn you are around, Cheers!

@Farid_Rener Why is there no module name in the data returned for app structure? Any additional flag to send so I can have the name included?

modules: Array(8)
0:
  case_properties: (8) ['district', 'ward',...]
  case_type: "my_case"
  forms: [{…}]
  unique_id: "8008eeda4a714490bba0d50f6306d348"
1:
  ...

Hi @Chaiwa_Berian ,
Nice to see you around here again too!
You are correct that currently the module name is not currently being included. I've made a change here that may go out soon to include this in the future.

1 Like

Thanks @Farid_Rener, watching the PR! :hugs: