OpenCaching.com/api/log

GET a single Log

Returns the log that matches the log_id that was provided as a Path Parameter.  For example http://www.opencaching.com/api/log/12345

This request does not use any parameters.

GET a list of Logs

Returns a list of logs based on the parameters that are provided.  For example the URL to get all the logs for a user would be http://www.opencaching.com/api/log?user_id=12345

This request requires that one of the following parameter is provided:  oxcode, user_id or geocache_owner_id.

Parameters

These parameters are used for getting a list of logs.

oxcode=oxcode

Only logs for the specified geocache are returned

user=user_id

Only logs for the specified user are returned

geocache_owner_id=user_id

Only logs for the geocaches hidden by the user specified are returned

type

List of the types of logs to be returned. If no type parameter is specified, all types are returned. Otherwise, only the listed types are returned.

Found it

Didn't find it

Comment

cache_type

List of the geocache types used to filter the response.  If no type parameter is specified, all types are returned. Otherwise, only the listed types are returned.  For example to get all of the logs a user has posted on virtual caches you could use the parameters user=12345&cache_type=Virtual Cache.

Traditional Cache

Multi-cache

Unknown Cache - aka Puzzle

Virtual Cache

limit=log_limit

Set the maximum number of logs that will be returned. The default is to return all of the logs that match the parameters specified.

offset=offset

Instead of returning the most recent logs that meet the criteria, return the most recent logs that meat the criteria after the first <offset> of logs.

This allows you to request logs one page at a time. For example, if you want to show 10 logs per page, the request for page one should have the parameter limit=10. For page two the request should have parameters limit=10&offset=10.  For page three, limit=10&offset=20.

count=true/false

This parameter changes the structure of the JSON that is returned.  It defaults to false to provide backwards compatibility. 

If it is true, instead of simply returning a list of logs it will return an object that has counts for the total number of logs that match the query.  The list of logs will be included in the object as logs=list of logs.  This will also allow us to add additional meta-data to the request without break backwards compatibility in the future.

It is recommended for new apps to use count=true as the old response is deprecated and will eventually be removed.