=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml'
--- src/docbkx/en/dhis2_user_man_web_api.xml 2012-09-07 04:19:27 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml 2012-10-10 06:58:47 +0000
@@ -422,7 +422,7 @@
<user id="user3ID" />
</users>
</message>
- Since we want to send a message to our friend the mobile user we need to look up her identifier. We do so by going to the Web API entry point and follow the link to the users resource at . We continue by following link to the DHIS Administrator at where we learn that her identifier is PhzytPW3g2J. We are now ready to put our XML message together to form a message where we want to ask the mobile user whether she has reported data for January 2012:
+ Since we want to send a message to our friend the mobile user we need to look up her identifier. We do so by going to the Web API entry point and follow the link to the users resource at . We continue by following link to the mobile user at where we learn that her identifier is PhzytPW3g2J. We are now ready to put our XML message together to form a message where we want to ask the mobile user whether she has reported data for January 2012:
<message xmlns="http://dhis2.org/schema/dxf/2.0">
<subject>Mortality data reporting</subject>
<text>Have you reported data for the Mortality data set for January 2012?</text>
@@ -443,7 +443,7 @@
<messageConversation name="DHIS version 2.7 is deployed" id="GDBqVfkmnp2"
link="http://apps.dhis2.org/demo/api/messageConversations/GDBqVfkmnp2"/>
</messageConversations>
- From the response we are able to read the identifier of the newly sent message which is ZjHHSjyyeJ2. Note that the link to the specific resource is embedded and available for consumers to use. From the description at we learned that we can reply directly to an existing message conversation once we know the URL by including the message text as the request payload (body). We are now able to construct a URL for sending our reply:
+ From the response we are able to read the identifier of the newly sent message which is ZjHHSjyyeJ2. Note that the link to the specific resource is embedded and can be followed in order to read the full message. From the description at we learned that we can reply directly to an existing message conversation once we know the URL by including the message text as the request payload (body). We are now able to construct a URL for sending our reply:
curl -d "Yes the Mortality data set has been reported" "http://apps.dhis2.org/demo/api/messageConversations/ZjHHSjyyeJ2" -H "Content-Type:text/plain" -u mobile:district -X POST -v
If all went according to plan you will receive a 200 OK status code.