How to have json response from /api/29/dataSetReport (Web API)

Hello,

Currently I am working on a custom app using web API. At certain stage in my app, it requires to have aggregation data (/api/29/dataSetReport) not in html table format but in JSON format.

Is there any way to obtain this?

1 Like

Hi @nibras -
Kindly check out the following link;

Home - DHIS2 Documentation. Check out from section 1.24

someone from the @dhis2-platform team will check and verify this too.

Best,
James.

Hi @nibras,

Just to confirm @jomutsani has pointed you in the right direction. Specifically section 1.24.5 and 1.24.6.

So you can query endpoints like

/dataSets/<DATASET_ID>/dataValueSet.json?<QUERY_PARAMS>
/dataValueSets.json?<QUERY_PARAMS>

The former is a bit more convenient. The latter is more flexible and will allow you to retrieve values from several dataSets at once.

Best regards,
Hendrik

2 Likes

Thank you @hendrik.

Best,
James.