dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22667
[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 739: Analytics, table layout
------------------------------------------------------------
revno: 739
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Thu 2013-05-23 19:10:40 +0200
message:
Analytics, table layout
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-23 07:43:13 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml 2013-05-23 17:10:40 +0000
@@ -1309,8 +1309,8 @@
<tgroup cols="4">
<colspec colname="c1" colnum="1" colwidth="2.44*"/>
<colspec colname="newCol2" colnum="2" colwidth="1*"/>
- <colspec colname="c2" colnum="3" colwidth="3.88*"/>
- <colspec colname="c3" colnum="4" colwidth="2.44*"/>
+ <colspec colname="c2" colnum="3" colwidth="3.67*"/>
+ <colspec colname="c3" colnum="4" colwidth="2.65*"/>
<thead>
<row>
<entry><emphasis role="italic">Query parameter</emphasis></entry>
@@ -1345,6 +1345,24 @@
<entry>Filters for the data/measures</entry>
<entry>EQ | GT | GE | LT | LE</entry>
</row>
+ <row>
+ <entry>tableLayout</entry>
+ <entry>No</entry>
+ <entry>Use plain data source or table layout for response</entry>
+ <entry>false | true</entry>
+ </row>
+ <row>
+ <entry>columns</entry>
+ <entry>No</entry>
+ <entry>Dimensions to use as columns for table layout</entry>
+ <entry>Any dimension (must be query dimension)</entry>
+ </row>
+ <row>
+ <entry>rows</entry>
+ <entry>No</entry>
+ <entry>Dimensions to use as rows for table layout</entry>
+ <entry>Any dimension (must be query dimension)</entry>
+ </row>
</tbody>
</tgroup>
</table>The <emphasis role="italic">dimension</emphasis> query parameter defines which
@@ -1381,6 +1399,15 @@
<para>As an example, the following query will return only records where the data value is
greater or equal to 6500 and less than 33000:</para>
<screen>api/analytics?dimension=dx:fbfJHSPpUQD;cYeuwXTCPkU&dimension=pe:2012&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw&measureCriteria=GE:6500;LT:33000</screen>
+ <para>In order to have the analytics resource generate the data in the shape of a ready-made
+ table, you can provide the <emphasis role="italic">tableLayout</emphasis> parameter with
+ true as value. Instead of generating a plain, normalized data source, the analytics resource
+ will now generate the data in table layout. You can use the <emphasis role="italic"
+ >columns</emphasis> and <emphasis role="italic">rows</emphasis> parameters with dimension
+ identifiers separated by semi-colons as values to indicate which ones to use as table
+ columns and rows. The column and rows dimensions must be present as a data dimension in the
+ query (not a filter). Such a request can look like this:</para>
+ <screen>api/analytics.html?dimension=dx:fbfJHSPpUQD;cYeuwXTCPkU&dimension=pe:2012Q1;2012Q2&dimension=ou:O6uvpzGd5pu&tableLayout=true&columns=dx;ou&rows=pe</screen>
</section>
<section>
<title>Response formats</title>