[openstreetmap/openstreetmap-website] Add notes multi fetch API call (PR #3707)

Anton Khorev notifications at github.com
Sat Aug 12 19:23:26 UTC 2023


Updated reasoning about entry points:

- `/api/0.6/notes`
There are proposals to show notes on the website by default. One objection to that is performance. Notes for the note layer are fetched with this call, and it's not implemented in cgimap. Adding more parameters to it makes a potential fast implementation more complicated.
- My original pull request was intended to be similar to element multifetch calls. That would also be a reason to put it at `/api/0.6/notes`, whoch has its drawbacks. But it may also be undesirable for another reason. Element multifetches fail if there is even a single element that can't be shown. You may request hundreds of elements and an error response. Theres's no partial result in this response and no indication which element caused the error. Meanwhile changeset query by ids just skips changesets it can't show.
- `/api/0.6/notes/search`
This seems like a better option in case we don't want to introduce another entry point and if we want feature parity with changeset searching. But there's a drawback. If you supply the note ids as the only parameter, you won't necessarily receive all of the requested notes even if they exist and not hidden. By default the close date filter is enabled, which will skip notes closed more than a week ago. Actual multifetch-like call should include `closed=-1` parameter to counteract that.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3707#issuecomment-1676065095
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3707/c1676065095 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230812/99d816f4/attachment.htm>


More information about the rails-dev mailing list