NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi I'm attempting to download a list of my GPX traces using the API call:

https://wiki.openstreetmap.org/wiki/API_v0.6#List:_GET_.2Fapi.2F0.6.2Fuser.2Fgpx_files

curl -o my_gpx.xml -u DaveF:'password' https://www.openstreetmap.org/api/0.6/DaveF/gpx_files

This call returns a 404 error: "Couldn't find a file/directory/API operation by that name on the OpenStreetMap server (HTTP 404)"

I've successfully use a similar call to download a singular gpx file by its #id, so I have established a connection with the server. What am I missing?

asked 03 Jul '21, 15:48

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

edited 03 Jul '21, 17:34

jmapb's gravatar image

jmapb
3.4k73361


Hi Dave, the string "user" in the API URL is a literal, not to be subbed with the user name. Try;

curl -o my_gpx.xml -u DaveF:PASSWORD_HERE https://www.openstreetmap.org/api/0.6/user/gpx_files

I've updated the API docs for clarification.

permanent link

answered 03 Jul '21, 17:27

jmapb's gravatar image

jmapb
3.4k73361
accept rate: 22%

Ta. Is there away to get it sorted by timestamp? The file I get returned starts with the latest upload & lists back to mid 2019 then jumps back to my first upload & continues to that mid 2019 pint.

A lot could do with amending on OSM wiki pages. They should be written with the newbie to each topic in mind. Lots of real world examples to show how it's done & less xml output.

(03 Jul '21, 18:57) DaveF

A lot could do with amending on OSM wiki pages

Agreed - but if you've just managed to do something (after figuring out how the wiki page was wrong) I'd say that you are supremely qualified to do that!

(03 Jul '21, 19:00) SomeoneElse ♦

I don't know of any way to request a sorted version of the GPX traces from the API. And I wouldn't assume the current semi-order will remain constant in the future either -- best to just treat the list as unordered and sort it clientside if needed.

(03 Jul '21, 21:48) jmapb
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×290
×275
×255

question asked: 03 Jul '21, 15:48

question was seen: 1,121 times

last updated: 03 Jul '21, 21:56

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum