← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 747: Event web api element naming update

 

------------------------------------------------------------
revno: 747
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Thu 2013-05-30 10:58:07 +0200
message:
  Event web api element naming update
modified:
  src/docbkx/en/dhis2_user_man_web_api.xml


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml'
--- src/docbkx/en/dhis2_user_man_web_api.xml	2013-05-30 08:40:18 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml	2013-05-30 08:58:07 +0000
@@ -361,12 +361,12 @@
       mortality" program for the "Ngelehun CHC" facility in the demo database can be seen
       below:</para>
     <screen>&lt;?xml version='1.0' encoding='utf-8'?>
-&lt;event programId="eBAyeGv0exc" organisationUnitId="DiszpKrYNg8" eventDate="2013-05-17" completed="true" storedBy="admin">
+&lt;event program="eBAyeGv0exc" orgUnit="DiszpKrYNg8" eventDate="2013-05-17" completed="true" storedBy="admin">
   &lt;coordinate latitude="59.8" longitude="10.9" />
   &lt;dataValues>
-    &lt;dataValue dataElementId="qrur9Dvnyt5" value="22" />
-    &lt;dataValue dataElementId="oZg33kd9taw" value="Male" />
-    &lt;dataValue dataElementId="msodh3rEMJa" value="2013-05-18" />
+    &lt;dataValue dataElement="qrur9Dvnyt5" value="22" />
+    &lt;dataValue dataElement="oZg33kd9taw" value="Male" />
+    &lt;dataValue dataElement="msodh3rEMJa" value="2013-05-18" />
   &lt;/dataValues>
 &lt;/event></screen>
     <para>To perform some testing we can save the XML payload as a file called<emphasis
@@ -375,8 +375,8 @@
     <screen>curl -d @events.xml "localhost:8080/api/events" -H "Content-Type:application/xml" -u admin:district -v</screen>
     <para>The same payload in JSON format looks like this:</para>
     <screen>{
-  "programId": "eBAyeGv0exc",
-  "organisationUnitId": "DiszpKrYNg8",
+  "program": "eBAyeGv0exc",
+  "orgUnit": "DiszpKrYNg8",
   "eventDate": "2013-05-17",
   "completed": true,
   "storedBy": "admin",
@@ -385,9 +385,9 @@
     "longitude": "10.9"
   },
   "dataValues": [
-    { "dataElementId": "qrur9Dvnyt5", "value": "22" },
-    { "dataElementId": "oZg33kd9taw", "value": "Male" },
-    { "dataElementId": "msodh3rEMJa", "value": "2013-05-18" }
+    { "dataElement": "qrur9Dvnyt5", "value": "22" },
+    { "dataElement": "oZg33kd9taw", "value": "Male" },
+    { "dataElement": "msodh3rEMJa", "value": "2013-05-18" }
   ]
 }</screen>
     <para>To send this you can save it to a file called <emphasis role="italic"
@@ -398,18 +398,18 @@
     <screen>&lt;?xml version='1.0' encoding='utf-8'?>
 &lt;events>
   &lt;eventList>
-    &lt;event programId="eBAyeGv0exc" organisationUnitId="DiszpKrYNg8" eventDate="2013-05-17" completed="true" storedBy="admin">
+    &lt;event program="eBAyeGv0exc" orgUnit="DiszpKrYNg8" eventDate="2013-05-17" completed="true" storedBy="admin">
       &lt;coordinate latitude="59.8" longitude="10.9" />
       &lt;dataValues>
-        &lt;dataValue dataElementId="qrur9Dvnyt5" value="22" />
-        &lt;dataValue dataElementId="oZg33kd9taw" value="Male" />
+        &lt;dataValue dataElement="qrur9Dvnyt5" value="22" />
+        &lt;dataValue dataElement="oZg33kd9taw" value="Male" />
       &lt;/dataValues>
     &lt;/event>
-    &lt;event programId="eBAyeGv0exc" organisationUnitId="DiszpKrYNg8" eventDate="2013-05-17" completed="true" storedBy="admin">
+    &lt;event program="eBAyeGv0exc" orgUnit="DiszpKrYNg8" eventDate="2013-05-17" completed="true" storedBy="admin">
       &lt;coordinate latitude="59.8" longitude="10.9" />
       &lt;dataValues>
-        &lt;dataValue dataElementId="qrur9Dvnyt5" value="26" />
-        &lt;dataValue dataElementId="oZg33kd9taw" value="Female" />
+        &lt;dataValue dataElement="qrur9Dvnyt5" value="26" />
+        &lt;dataValue dataElement="oZg33kd9taw" value="Female" />
       &lt;/dataValues>
     &lt;/event>
   &lt;/eventList>
@@ -420,8 +420,8 @@
     <screen>{
   "eventList": [
   {
-    "programId": "eBAyeGv0exc",
-    "organisationUnitId": "DiszpKrYNg8",
+    "program": "eBAyeGv0exc",
+    "orgUnit": "DiszpKrYNg8",
     "eventDate": "2013-05-17",
     "completed": true,
     "storedBy": "admin",
@@ -430,12 +430,12 @@
       "longitude": "10.9"
     },
     "dataValues": [
-      { "dataElementId": "qrur9Dvnyt5", "value": "22" },
-      { "dataElementId": "oZg33kd9taw", "value": "Male" }
+      { "dataElement": "qrur9Dvnyt5", "value": "22" },
+      { "dataElement": "oZg33kd9taw", "value": "Male" }
     ] },
   {
-    "programId": "eBAyeGv0exc",
-    "organisationUnitId": "DiszpKrYNg8",
+    "program": "eBAyeGv0exc",
+    "orgUnit": "DiszpKrYNg8",
     "eventDate": "2013-05-17",
     "completed": true,
     "storedBy": "admin",
@@ -444,12 +444,12 @@
       "longitude": "10.9"
     },
     "dataValues": [
-      { "dataElementId": "qrur9Dvnyt5", "value": "26" },
-      { "dataElementId": "oZg33kd9taw", "value": "Female" }
+      { "dataElement": "qrur9Dvnyt5", "value": "26" },
+      { "dataElement": "oZg33kd9taw", "value": "Female" }
 	] }
   ]
 }</screen>
-    <para>The table below describes the meaning of each element. Most elements should be reasonably
+    <para>The table below describes the meaning of each element. Most elements should be fairly
       self-explanatory.</para>
     <para>
       <table>