=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml' --- src/docbkx/en/dhis2_user_man_web_api.xml 2012-08-02 13:23:42 +0000 +++ src/docbkx/en/dhis2_user_man_web_api.xml 2012-08-07 14:04:45 +0000 @@ -254,6 +254,47 @@ In this example, cURL will authenticate to the server through Basic authentication using our supplied username and password as credentials through the -u flag. In a real-world scenario, looking up identifiers, constructing and dispatching XML messages would be the task of the client software application. This software would probably interact with the more machine-friendly XML and JSON resource representations and not the human-friendly HTML representations like we did in this example. Developing creative and robust consumers of the Web API services begins here. + +
+ Example: Sending data values using SDMX-HD + Posting a dataValueSet report formatted using the WHO SDMX-HD standard is very similar to + the dxf2 example above. The same api/dataValueSets resource is used, but the client has to + specify the Content-Type as application/sdmx+xml. + The example below shows an SDMX-HD dataValueSet: + + + +
+ OpenMRS-Export + false + 2012-03-21 + +
+ + + + + + + + + + + + + +
]]>
+ One thing to note is that the SDMX-HD metadata for dataelements, orgunits and datasets are identified using codes rather than uids. + Assuming these coded datasets are present in the DHIS2 server then this can be posted, for example using the curl command below. + curl -d @sdmxdatavalueset.xml "http://{server base url}/api/dataValueSets" + -H "Content-Type:application/sdmx+xml" -u admin:district -v +
+
Example: Sending large bulks of data values The previous example showed us how to send a set of related data values sharing the same period and organisation unit. This example will show us how to send large bulks of data values which don't necessarily are logically related.