=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml'
--- src/docbkx/en/dhis2_user_man_web_api.xml 2013-03-14 14:56:36 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml 2013-03-15 17:14:25 +0000
@@ -183,13 +183,13 @@
Working with the meta-data API
- With the release of 2.9, a special entry point for meta-data was added in the API, this
- can be accessed through /api/metaData. This section will give
- a basic introduction to working with this API, for specific synchronization issues, please see
- INTEGRATION_CHAPTER.
- By default, talking to /api/metaData will give you
- everything, rendered as XML. But just as we can define what we want in the general API, we can
- also do that with /api/metaData.
+ The meta-data resource can be accessed at /api/metaData.
+ This resource lets you read and write the full set of meta-data. This section will give a
+ basic introduction to working with this API. For specific synchronization issues, please see
+ the integration chapter.
+ By default, interacting with /api/metaData using the GET
+ HTTP method will give you all meta-data rendered as XML. You can also be more specific about
+ the meta-data elements you are interested in.
Available Content-Types
@@ -259,18 +259,7 @@
lastUpdated
date
false
- Three date formats are supported:
-
- YEAR
-
-
- MONTH/YEAR
-
-
- DAY/MONTH/YEAR
-
-
-
+ 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.
@@ -278,18 +267,27 @@
- Example: Get a filtered set of meta-data that was updated since August 1st 2012
+ Example: Get a filtered set of meta-data that was updated since August 1
+ 2012
As 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
- Example: Get meta-data that was updated since february 2012
+ Example: Get meta-data that was updated since February
+ 2012
This example will just the default assumeTrue setting,
- along with getting the last updates from february 2012. This means that every single type that
+ 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
+ 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