Dhis2-api

hello community

i have this question lets say I have a scenario where I want to fetch data of all data sets I have in dhis2 without even specifying the organisation unit because I want to make integration with kibana so if I have those raw data I will be able to build visualization beyond what I have in dhis2. so is there any endpoint I can use or you can also give other efficient suggestion.

Hi @mugisha_alain

It seems that you want to get the values in these datasets? Why not use Import/Export app? Or the API request a requirement?

Finally, you could use the API url that directly refers to the dataset itself, instanceURL/api/dataSets/{datasetid}

The API request is a requirement so I need an API that I can use and retrieve all the row data of all datasets I want particularly

Hi @mugisha_alain. You could consider to use the children parameter of the dataValueSets described here. This should allow you to specify the parent organisation unit, without specifying all of the orgunits children directly.

Another option would be to develop a custom SQL query which might suit your needs better. SQL queries can also have parameters which you might need. You can read more about that here.

Good luck and let us know if you have any further questions.

Best regards,
Jason