[OSM-dev] Changeset replication contains outdated usernames / how to link to user profile by uid

Martin Raifer tyr.asd at gmail.com
Thu Aug 5 14:06:58 UTC 2021


You can use the OSM API [1] to get the a user's current display_name,
e.g. https://www.openstreetmap.org/api/0.6/user/115612

[1] https://wiki.openstreetmap.org/wiki/API_v0.6#Details_of_a_user

Cheers, Martin

On Thu, Aug 5, 2021 at 3:50 PM Sebastian Kürten
<sebastian.kuerten at fu-berlin.de> wrote:
>
> Hi,
>
> I'm using the minutely changeset replication files in order to track
> edits happening on a certain topic and am shuffling the information
> relevant to me into a database.
>
> Now I experience the following: the changeset XML element contains
> attributes "user" and "uid". When a user has changed their username
> since that changeset was closed, the replication file still contains
> the old username from that time. That makes sense as replication files
> don't get changed retroactively. When I retrieve the same changeset via
> https://www.openstreetmap.org/api/0.6/changeset/ID then it shows the
> current username, even for old changesets.
>
> I'm building a UI for that whole thing in order to visualize the
> changes recorded. While displaying the changesets, I can naturally link
> to the individual changeset using the link pattern mentioned above and I
> would also like to link to the contributing user's profile page such as
> my own (https://www.openstreetmap.org/user/sebkur). However, when the
> user changed their name, it's possible I'm creating a dead link.
> I found out I can retrieve the current username from the uid by querying
> the API like this: https://www.openstreetmap.org/api/0.6/user/22917
>
> However I'm wondering if there is any way to link to a user profile by
> specifying the user id directly to some endpoint, such as
> https://www.openstreetmap.org/uid/22917? I suspect for the website it
> wouldn't make much of a difference whether it looks up the profile by
> the user name or the user id from the database, but probably there's
> just no endpoint that links to users by their id, or is there?
>
> Other websites such as StackOverflow do resolve user ids and I think
> that makes a lot of sense for services where the user id is static
> while the name may change. (Example:
> https://stackoverflow.com/users/1268759 ; observe how the name gets
> appended to the URL automatically and you can even change the appended
> name and it will be changed back after submitting the URL in the
> browser)
>
> Thanks,
> Sebastian
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev



More information about the dev mailing list