[openstreetmap/openstreetmap-website] Multi fetch for objects histories (Issue #5008)

Roman Deev notifications at github.com
Fri Jul 19 23:00:41 UTC 2024


### Problem

Currently, there is no way to request the history of multiple objects in a single request.

### Description

Let's say you want to get the full history of changes to the line geometry. To do this, you need to get the history of the line + the history of all points that have ever entered the line. There seem to be only two ways to do this right now: 
1. Call in the worst case 2000 /history for nodes (in one of the line versions)
2. Make a Multi fetch of the current state of points, and then generate queries like: _nodes?nodes=1v1,1v2,...2v1,...._

In theory, if the nodes versions are small (1-5), then loading with Multi fetch ([~600 versions](https://wiki.openstreetmap.org/wiki/API_v0.6#Multi_fetch:_GET_/api/0.6/[nodes|ways|relations]?#parameters) at a time), the second method will only need 4-17 requests

In practice, most likely you will not be able to get a boost due to https://github.com/openstreetmap/openstreetmap-website/issues/5005

----
But why all these difficulties? Why not have multi fetch for /history?

Something like: /nodes_histories?nodes=1,2,3

p.s. judging [by](https://github.com/openstreetmap/openstreetmap-website/issues/5005#issuecomment-2239423787), most likely, this method would also be useful for undo edits tools

### Screenshots

_No response_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5008
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/5008 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240719/1d742a94/attachment-0001.htm>


More information about the rails-dev mailing list