Files
oc-server3/htdocs/okapi/services/replicate/fulldump.xml
2014-10-08 10:06:07 +02:00

68 lines
3.4 KiB
XML

<xml>
<brief>Download OKAPI database snapshot</brief>
<issue-id>110</issue-id>
<desc>
<p>Download the latest snapshot of OKAPI database. You should call this method
only once.</p>
<p>For some applications it might be desireable to have a quick access to the entire
Opencaching database (instead of querying for specific portions of it). You may use
OKAPI's <b>replicate</b> module to achive this state. The <b>changelog</b> method
is the primary replication service which you will use. However, to correctly set up
your first database copy, you will need to use the <b>fulldump</b> method.</p>
<p>A couple of things for you to remember:</p>
<ul>
<li>Currently, this method is available <b>for developers only</b>,
not for the individual users. We don't want users to download a fresh snapshot of
the entire database every time they want, this could kill our servers.
If you want to enable such features for your users, you can do it, but you
must use <b>your own server</b> for serving fulldump requests. (You don't
have to use your server to relay changelog requests.)</li>
<li>Fulldump is a copy of the entire database. We generate such copy once every couple of
days. This copy if intended for you to make a fresh start only. Later, you
must use the <b>changelog</b> method to keep your data up-to-date.</li>
<li>Every time our database is extended (new fields or new object types), and you want to
make use of these new fields, you are of course allowed to download a fulldump copy again.</li>
<li>There is no XMLMAP version of this file. JSON only.</li>
</ul>
<p><b>Additional notes on data attribution:</b> Cache descriptions will be
generated using the <b>attribution_append=static</b> parameter (see the
geocache method). This is because the full attributions are not always suitable
for replication, since they may contain dynamically changing dates on some
installations (<a href='https://code.google.com/p/opencaching-api/issues/detail?id=178'>why?</a>).
To make sure that static attributions are enough, consult the local Data
Licence (the Sign Up page).</p>
</desc>
<returns>
<p>Compressed archive with JSON-encoded files. File named <b>index.json</b> will
contain a dictionary of the following structure:</p>
<ul>
<li><b>revision</b> - revision of the database snapshot contained in the archive,</li>
<li><b>data_files</b> - list of filenames which contain the changelog entries for
you to parse. Each file contains a JSON-encoded list of changelog entries, in format
described in the <b>changelog</b> method ("replace" only).</li>
<li><b>meta</b> - a dictionary of other meta data, not important.</li>
</ul>
<p>Note: We use TGZ or TBZ2 format to encode this archive:</p>
<ul>
<li><b>TGZ</b> archive (also known as <b>.tar.gz</b>) is a TAR
archive compressed with GZIP.</li>
<li><b>TBZ2</b> archive (also known as <b>.tar.bz2</b>) is a TAR
archive compressed with BZIP2.</li>
</ul>
<p>There are many tools available for handling these archives. In Linux, try "tar -xf filename".</p>
</returns>
</xml>