=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml'
--- src/docbkx/en/dhis2_user_man_web_api.xml 2014-04-22 12:45:52 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml 2014-04-22 13:23:55 +0000
@@ -799,6 +799,23 @@
categoryOptionCombo="bRowv6yZOF2" value="10001"/>
</dataValueSet>
The header tells us that the request was processed successfully and that we are receiving a response in XML format. The XML message looks familiar - it is the data values we sent in the previous section.
+ You can also request the same data with a JSON
+ payload:curl "http://apps.dhis2.org/demo/api/dataValueSets?dataSet=pBOMPrpg1QX&period=201201&orgUnit=DiszpKrYNg8" -H "Accept:application/json" -u admin:district -v
+ The response will look something like
+ this:{
+ "dataSet": "pBOMPrpg1QX",
+ "completeData": "2012-02-03",
+ "period": "201201",
+ "orgUnit": "DiszpKrYNg8",
+ "dataValues": [
+ { "dataElement": "eY5ehpbEsB7", "categoryOptionCombo": "bRowv6yZOF2", "period": "201201",
+ "orgUnit": "DiszpKrYNg8", "value": "10003" },
+ { "dataElement": "Ix2HsbDMLea", "categoryOptionCombo": "bRowv6yZOF2", "period": "201201",
+ "orgUnit": "DiszpKrYNg8", "value": "10002" },
+ { "dataElement": "f7n9E0hX8qk", "categoryOptionCombo": "bRowv6yZOF2", "period": "201201",
+ "orgUnit": "DiszpKrYNg8", "value": "10001" }
+ ]
+}
Reading large bulks of data values