Api Finding an Element by ID

Hello I am wondering if given an id for a indicator ie “qDXW7WMLT99” or indicator name ie ARV Adult - 1d = AZT/3TC+DTG 150/300mg + 50mg 1st line if there is a way using the api to find the data elements location so I can query it.

For example I inspect elements from a generated report to determine where the data is coming from and I get.

<span class="val" data-de="wfaQBIVQxWo" data-co="NtjMVmRfvHH">2</span>

but when I go to the data set wfaQBIVQxWo it doesn’t contain NtjMVmRfvHH also I can not find NtjMVmRfvHH when I scrap the dataElement ids from dataElements but the value of 2 is clearly coming from somewhere so how can I find that end point?

Thank you for your help

Hi @Jake_Lamers

You can find the data element’s UID by going to the configuration in the Maintenance app and selecting its details. See screenshot below:

note if you found somewhere in an html or logs a uid
you can find to what it refers via the api

https://play.im.dhis2.org/stable-2-41-1/api/identifiableObjects/<replacewithuid>.json

you’ll find out that it’s a data element

https://play.im.dhis2.org/stable-2-41-1/api/identifiableObjects/FTRrcoaog83.json

and this one a category option combos

https://play.im.dhis2.org/stable-2-41-1/api/identifiableObjects/S34ULMcHMca.json
2 Likes