dhis2/d2

Methods for metadata export

Closed this issue · 2 comments

We are using metadata export at one of our DHIS2 apps at UPC and we're building it on-top of d2 library.

We find it would be useful to:

  1. Access the general export "/api/metadata.json" endpoint directly from the d2 library.

  2. Access the specific export endpoints (such as /api/dataSets/ID/metadata.json) to gather elements with dependencies.

  3. Include in the d2 models an attribute to know if the modelProperties are included/excluded from the metadata exporting on DHIS2.

I'm not sure if GitHub is the proper method for asking such questions, please suggest any better option for discussion.

Thanks and apologies,

Alexis Rico
WISCENTD-UPC

stale commented

Hi! Due to a lack of activity on this issue over time (7.776*10^9 ms and counting, to be precise) it seems to be stale. If there is no further progress on it, it will be closed automatically.

If this is still relevant, maybe there is something you can do to move it forward? For example provide further information in a comment, or supply a PR? Any activity on this issue will keep it open. Thanks! 🤖

In several applications (5 to be precise in the last year) we use the metadata endpoints through axios instead of d2 as the main connector to DHIS2.

Real world scenarios

Data entry apps for datasets and programs.

We use the /dataSets/metadata and /programs/metadata to get everything in one request instead of doing multiple requests to the server to retrieve all the categories, categoryOptions, categoryOptionCombos, sections, dataElements, programStages...

Metadata synchronization.

We sometimes require to obtain multiple metadata objects of different types in a same request. Traversing the whole metadata database without the /metadata endpoint (using the "id:in" filter) is impossible without either growing old or crashing the server with internal java OOM.