ver. 1958 (4e4db56)
services/apiref
services/apisrv
services/attrs
services/caches
services/caches/formatters
services/caches/map
services/caches/search
services/caches/shortcuts
services/logs
services/logs/images
services/oauth
services/replicate
services/users

Download OKAPI database snapshot
:: services/replicate/fulldump method

Minimum Authentication: Level 1 (see Authentication Levels)
https://opencache.uk/okapi/services/replicate/fulldump

Download the latest snapshot of OKAPI database. You should call this method only once.

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 replicate module to achive this state. The changelog 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 fulldump method.

A couple of things for you to remember:

  • Currently, this method is available for developers only, 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 your own server for serving fulldump requests. (You don't have to use your server to relay changelog requests.)
  • 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 changelog method to keep your data up-to-date.
  • 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.
  • There is no XMLMAP version of this file. JSON only.

Additional notes on data attribution: Cache descriptions will be generated using the attribution_append=static 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 (why?). To make sure that static attributions are enough, consult the local Data Licence (the Sign Up page).

Additional notes on OC team annotations: Cache descriptions will be generated using the oc_team_annotation=description parameter (see the geocache method). This ensures that the team annotations are always displayed alongside the description. If you decide to display them separately (which is recommended!), you may hide the ocTeamCommentSection classed <div> in the description text.

Plus required consumer_key argument, assigned for your application.

Returned value:

Compressed archive with JSON-encoded files. File named index.json will contain a dictionary of the following structure:

  • revision - revision of the database snapshot contained in the archive,
  • data_files - 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 changelog method ("replace" only).
  • meta - a dictionary of other meta data, not important.

Note: We use TGZ or TBZ2 format to encode this archive:

  • TGZ archive (also known as .tar.gz) is a TAR archive compressed with GZIP.
  • TBZ2 archive (also known as .tar.bz2) is a TAR archive compressed with BZIP2.

There are many tools available for handling these archives. In Linux, try "tar -xf filename".