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

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
181346
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.7k15388
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

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
×127
×22

question asked: 28 Oct '14, 21:29

question was seen: 3,477 times

last updated: 28 Oct '14, 22:18

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