← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 779: System resource api doc

 

------------------------------------------------------------
revno: 779
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Tue 2013-08-13 13:11:22 +0200
message:
  System resource api doc
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-08-09 14:23:23 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml	2013-08-13 11:11:22 +0000
@@ -1847,6 +1847,27 @@
     <para>These requests will return immediately and initiate a server-side process.</para>
   </section>
   <section>
+    <title>System resource</title>
+    <para>The system resource provides you with convenient information and functions. The system
+      resource can be found at <emphasis role="italic">/api/system</emphasis>. </para>
+    <para>To genereate valid, random UIDs you can do a GET request to this resource:</para>
+    <screen>http://&lt;server-url>/api/system/uid?n=3</screen>
+    <para>The <emphasis role="italic">n</emphasis> query parameter is optional and indicates how
+      many UIDs you want to be returned with the response. The response will contain a JSON array
+      similar to this:</para>
+    <screen>[
+    "Y0moqFplrX4",
+    "WI0VHXuWQuV",
+    "BRJNBBpu4ki"
+]</screen>
+    <para>To get information about the current system you can do a GET request to this URL:</para>
+    <screen>http://yourdomain.com/api/system/info</screen>
+    <para>The system info response currently includes the following:</para>
+    <screen>{
+    contextPath: "http://yourdomain.com";
+}</screen>
+  </section>
+  <section>
     <title>FRED API</title>
     <para>DHIS 2 from version 2.11 implements support for the current draft
       of the FRED API version 1.0. The project defines itself as <quote>open standard for sharing and updating