← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 1079: add TEI example to docs

 

------------------------------------------------------------
revno: 1079
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Sun 2014-05-25 16:08:26 +0200
message:
  add TEI example to docs
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	2014-05-25 14:04:13 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml	2014-05-25 14:08:26 +0000
@@ -4427,6 +4427,21 @@
         HTTP <emphasis role="bold">POST</emphasis> method. You can post the payload the the
         following URL:</para>
       <screen>/api/trackedEntityInstances</screen>
+      <para> For example, let's create a new instance of a Person and setting the age to 30 (using
+        our demo
+        server):<screen>{
+  "trackedEntity": "cyl5vuJ5ETQ",
+  "orgUnit": "ImspTQPwCqd",
+  "attributes": [
+    {
+      "attribute": "spFvx9FndA4",
+      "value": "30"
+    }
+  ]
+}</screen></para>
+      <para>To push this to the server, you can use the cURL
+        command:<screen>curl -X POST -d @data.json -H "Content-Type: application/json" -u admin:district
+  http://apps.dhis2.org/demo/api/trackedEntityInstances -v</screen></para>
     </section>
     <section>
       <title>Updating a tracked entity instance</title>