=== 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 @@ + The following query parameters are available for customizing your request. Available Query Filters @@ -266,27 +267,23 @@ assumeTruebooleanfalse - true/false - If you don't want everything that /api/metaData 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). + true | false + Indicates whether to get all resources or no resources by default. {resources} boolean false - true/false (default depends on assumeTrue) - Please see /api 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. + true | false (default depends on assumeTrue) + See /api for available resources. Indicates + which resources to include in the response. lastUpdated date false Three date formats are supported: YEAR | MONTH/YEAR | DAY/MONTH/YEAR - 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. + Filters the meta-data based on the lastUpdated field. @@ -297,24 +294,23 @@ 2012As described in the last section, there is a number of options you can apply to /api/metaData 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 cURL as the HTTP - client.curl -H "Accept: application/xml" -u user:pass - {HOST}/api/metaData?assumeTrue=false&organisationUnits=true&lastUpdated=01/08/2012 + role="italic">/api/metaData 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 cURL as the HTTP + client.curl -H "Accept: application/xml" -u user:pass "http://apps.dhis2.org/demo/api/metaData?assumeTrue=false&organisationUnits=true&lastUpdated=01/08/2012"Example: Get meta-data that was updated since February 2012This example will just the default assumeTrue setting, along with getting the last updates from February 2012. This means that every single type that has been updated will be - retrieved.curl -H "Accept: application/xml" -u user:pass {HOST}/api/metaData?lastUpdated=02/2012 + retrieved.curl -H "Accept: application/xml" -u user:pass "http://apps.dhis2.org/demo/api/metaData?lastUpdated=02/2012"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: - curl -H "Content-Type: application/xml" -u user:pass -d @metaData.xml {HOST}/api/metaData -X POST + curl -H "Content-Type: application/xml" -u user:pass -d @metaData.xml "http://apps.dhis2.org/demo/api/metaData" -X POST
Sending data values