← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 759: Web API meta data

 

------------------------------------------------------------
revno: 759
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Sun 2013-06-09 20:31:44 +0200
message:
  Web API meta data
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-06-04 16:49:31 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml	2013-06-09 18:31:44 +0000
@@ -238,6 +238,7 @@
         </tgroup>
       </table>
     </para>
+    <para>The following query parameters are available for customizing your request.</para>
     <para>
     <table>
         <title>Available Query Filters</title>
@@ -266,27 +267,23 @@
               <entry>assumeTrue</entry>
               <entry>boolean</entry>
               <entry>false</entry>
-              <entry>true/false</entry>
-              <entry>If you don&apos;t want everything that <emphasis role="italic"
-                  >/api/metaData</emphasis> gives you by default, when set to false, this option
-                will not return anything by default. You have to enable the resources you want
-                yourself (see below). </entry>
+              <entry>true | false</entry>
+              <entry>Indicates whether to get all resources or no resources by default.</entry>
             </row>
             <row>
               <entry>{resources}</entry>
               <entry>boolean</entry>
               <entry>false</entry>
-              <entry>true/false (default depends on assumeTrue)</entry>
-              <entry>Please see <emphasis role="italic">/api</emphasis> for available resources.
-                This option will allow you to override the default (which is taken from assumeTrue)
-                and further refine what meta-data you want. </entry>
+              <entry>true | false (default depends on assumeTrue)</entry>
+              <entry>See <emphasis role="italic">/api</emphasis> for available resources. Indicates
+                which resources to include in the response.</entry>
             </row>
             <row>
               <entry>lastUpdated</entry>
               <entry>date</entry>
               <entry>false</entry>
               <entry>Three date formats are supported: YEAR | MONTH/YEAR | DAY/MONTH/YEAR</entry>
-              <entry>Filters the meta-data based on the lastUpdated field, this allows you to synchronize meta-data as a nightly job, without downloading everything from the server. </entry>
+              <entry>Filters the meta-data based on the lastUpdated field.</entry>
             </row>
           </tbody>
         </tgroup>
@@ -297,24 +294,23 @@
         2012</emphasis>
     </para>
     <para>As described in the last section, there is a number of options you can apply to <emphasis
-        role="bold">/api/metaData</emphasis> to give you a filtered view. The use-case we will be
-      looking into here, is the case where you want a nightly job that synchronizes organisation
-      units. We will be using <emphasis role="italic">cURL</emphasis> as the HTTP
-      client.<screen>curl -H &quot;Accept: application/xml&quot; -u user:pass
-    {HOST}/api/metaData?assumeTrue=false&amp;organisationUnits=true&amp;lastUpdated=01/08/2012</screen></para>
+        role="italic">/api/metaData</emphasis> to give you a filtered view. The use-case we will be
+      looking into here is where you want a nightly job that synchronizes organisation units. We
+      will be using <emphasis role="italic">cURL</emphasis> as the HTTP
+      client.<screen>curl -H &quot;Accept: application/xml&quot; -u user:pass "http://apps.dhis2.org/demo/api/metaData?assumeTrue=false&amp;organisationUnits=true&amp;lastUpdated=01/08/2012";</screen></para>
     <para><emphasis role="bold">Example: Get meta-data that was updated since February
         2012</emphasis></para>
     <para>This example will just the default <emphasis role="italic">assumeTrue</emphasis> setting,
       along with getting the last updates from February 2012. This means that every single type that
       has been updated will be
-      retrieved.<screen>curl -H &quot;Accept: application/xml&quot; -u user:pass {HOST}/api/metaData?lastUpdated=02/2012</screen></para>
+      retrieved.<screen>curl -H &quot;Accept: application/xml&quot; -u user:pass "http://apps.dhis2.org/demo/api/metaData?lastUpdated=02/2012";</screen></para>
     <para>The meta-data resource can also be used to write or update meta-data by using the POST
       HTTP method. The meta-data content can be both XML and JSON, using "application/xml" and
       "application/json" content type respectively. The request payload content will be accepted in
       several formats, including plain text, zipped and gzipped. POSTing a meta-data payload can be
       done for example like this, where metaData.xml is a file in the same directory with the
       meta-data content:</para>
-    <screen>curl -H "Content-Type: application/xml" -u user:pass -d @metaData.xml {HOST}/api/metaData -X POST</screen>
+    <screen>curl -H "Content-Type: application/xml" -u user:pass -d @metaData.xml "http://apps.dhis2.org/demo/api/metaData"; -X POST</screen>
   </section>
   <section>
     <title>Sending data values</title>