-
Notifications
You must be signed in to change notification settings - Fork 22
I know a lot of people like to automate things and used the old version to scrape large areas. Lab2Gpx V2 is not a form anymore but uses an api the fetch data from the backend.
For the download just send the settings as a json string in the body of the POST request
curl -X POST "https://api.lab2gpx.gcutils.de/download" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"version": 2,
"locale": "en",
"radius": 15,
"coordinates": {
"lat": 52.520008,
"lon": 13.404954
},
"limit": 300,
"cacheType": "Lab Cache",
"linear": "default",
"prefix": "LC",
"stageSeparator": true,
"customCodeTemplate": null,
"userGuid": null,
"completionStatuses": [
"0",
"1",
"2"
],
"includeQuestion": true,
"includeWaypointDescription": true,
"includeCacheDescription": true,
"excludeOwner": null,
"excludeNames": null,
"excludeUuids": null,
"quirksL4Ctype": false,
"outputFormat": "gpx"
}
JSONThe response is either HTTP Status 200 and the file or any other Status Code and the error message in a json response.
Instead of JSON you can also send variables as Content-Type: application/x-www-form-urlencoded e.g. for usage with GSAKs PostUrl() function. See https://github.com/mirsch/lab2gpx/issues/215
to match other/old data you may require the Lab2Gpx Code for an UUID or vice versa
GET https://api.lab2gpx.gcutils.de/lab2gpx-data/by-code/<CODE>
GET https://api.lab2gpx.gcutils.de/lab2gpx-data/by-uuid/<UUID>
will give you the corresponding data from the Lab2Gpx Database or HTTP Status 404 if the information was not found in the DB