=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml' --- src/docbkx/en/dhis2_user_man_web_api.xml 2013-12-27 13:36:11 +0000 +++ src/docbkx/en/dhis2_user_man_web_api.xml 2013-12-27 14:20:33 +0000 @@ -1084,6 +1084,94 @@ role="italic">application/json.
+ Data approval + This section explains how to approve, unapprove and check approval status using the + dataApprovals resource. Approval is done per data set, + period, organisation unit and attribute option combo. + + Data approval query parameters + + + + + + + Query parameter + Required + Description + + + + + ds + Yes + Data set identifier + + + pe + Yes + Period identifier + + + ou + Yes + Organisation unit identifier + + + cc + No (must combine with cp) + Attribute combo identifier + + + cp + No (must combine with cp) + Attribute option identifiers, separated with ; for multiple values + + + +
+ To check the status for approval you can issue a GET + request to the dataApprovals resource: + api/dataApprovals + + Approval status + + + + + + Approval status + Description + + + + + APPROVED + Data in this data set is approved for this period and organisation unit + + + READY_FOR_APPROVAL + Data in this data set is ready to be approved for this period and organisation + unit + + + WAITING_FOR_LOWER_LEVEL_APPROVAL + Data is not ready to be approved because it is waiting for approval at a + lower-level organisation unit + + + APPROVAL_NOT_NEEDED + Data does not need approval because approval is not required or data set is not + collected at organisation unit + + + +
+ To approve data you can issue a POST request to the + dataApprovals resource. To un-approve data you can issue a DELETE request. +
+
Writing and reading messages DHIS 2 features a mechanism for sending messages for purposes such as user feedback, notifications and general information to users. Messages are delivered to the DHIS 2 message inbox but can also be sent to the user's email addresses and mobile phones as SMS. In this example we will see how we can utilize the Web API to send and read messages. We will pretend to be the DHIS Administrator user and send a message to the Mobile user. We will then pretend to be the mobile user and read our new message. The resource we need to interact with when sending and reading messages is the