Hi Devs. I am failing to get data from the /dataValueSets api with an error 409. May you find the screenshot attached and Kindly assist. This is occuring even if I pass the orgUnit or ouMode
Version: 2.37.6
Hi Devs. I am failing to get data from the /dataValueSets api with an error 409. May you find the screenshot attached and Kindly assist. This is occuring even if I pass the orgUnit or ouMode
Version: 2.37.6
Kindly share the query that you are using…you can remove/hid your fully qualified domain name (FQDN).
Thanks
Hi @antony.sibanda. Here are the 2 queries i tried.
//api/dataValueSets.json?orgUnit=xxxxxxxxxxxxxxxx
//api/dataValueSets.json?ouMode=ALL
Depending on how you wanna read the data:
dataValueSets.json?dataSet=dataSetId&period=period&orgUnit=orgUnit
dataValueSets.json?dataElementGroup=dataElementGroupId&period=period&orgUnit=orgUnit
dataValueSets.json?dataElement=dataElementId&period=period&orgUnit=orgUnit
you have to replace the bold items
you can use below end point
/api/dataValueSets?orgUnit=org_unit_id_here&period=202304&dataSet=dataset_id_here
Thanks
Thanks. @antony.sibanda these queries seem to be returning only one object. I need a list of dataValueSets. Is there a way I can get it.
Maybe if you’d use the SQL View in Maintenance app then when it generates the table with the values you need, you could retrieve it using the API.
here’s a query on the play server it returns serveral values in the dataValues
field
https://play.im.dhis2.org/stable-2-39-5/api/dataValueSets.json?dataSet=BfMAe6Itzgt&orgUnit=TmCsvdJLHoX&period=202101
note that
dataValues
field can be missing depending on your version (instead of empty array)if you have only 1 value… it’s perhaps because