Pulling Coordinates from DHIS using the API

Hello Everyone,

I need a little help here. In our system we have recently added in a few thousand point coordinates into the system. We pull all of our data out into Power BI to do more detailed data analysis. Using the api I pull out everything with our org units, but I have not been successful in pulling out the Lat and Long for them. Our current API is as follows:
https://infolink.fhi360.org/api/33/organisationUnits?paging=false&fields=id,name,code,path,level,shortName,[id,parent]

I have tried a few different variations to pull out the coordinates but with no luck. If someone could help me out with this I would greatly appreciate it.

Hi @gparola

Welcome back to the community!

You can add geometry[coordinates] but if the OU doesn’t have the values, it will not appear. Here’s an example from play: INSTANCE_NAME_HERE/api/organisationUnits?paging=false&fields=id,name,code,path,level,shortName,[id,parent],geometry[coordinates]

Hope this helps!

Thanks!

1 Like