I want to (programatically) get the most recent changeset for a user (specifically, I need the timestamp of when it was closed, if it was).

There doesn't seem to be any API means of doing this, unless I'm missing something. There isn't a way to get user UID from username (nor can I see a way to do this manually), and there isn't a means to get changesets by user, either by UID or username (if there was a way to get a user UID e.g. on their profile page, I could start with that, but username is easier - yes I know it could change in principle).

I can see how to do it - the main website does it - but it isn't nice, in that it means parsing a fragment of HTML rather than properly structured XML as the API would...

https://www.openstreetmap.org/user/username/history?list=1

gives a fragment of HTML, an OL and the first LI in that has an A with an href of the changeset I want, which I can then plug into the API.

Is there a better way?

asked 28 Oct '14, 21:29

davidearl's gravatar image

davidearl
121236
accept rate: 0%


You should check the API 0.6 changesets method call: Link. It comes with all the details you're looking for.

https://api.openstreetmap.org/api/0.6/changesets?user=3582
https://api.openstreetmap.org/api/0.6/changesets?display_name=davidearl
permanent link

answered 28 Oct '14, 21:55

mmd's gravatar image

mmd
5.6k14988
accept rate: 37%

edited 28 Oct '14, 21:57

1

Thank you, I completely missed that in the documentation

(28 Oct '14, 22:18) davidearl
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:

×241
×112
×18

question asked: 28 Oct '14, 21:29

question was seen: 2,040 times

last updated: 28 Oct '14, 22:18

powered by OSQA