[openstreetmap/openstreetmap-website] Report rate limit settings in capabilities API call (Issue #4380)
Martin Raifer
notifications at github.com
Thu Nov 30 11:49:26 UTC 2023
### Problem
Recently, hourly upload limits (#4319) were introduced to the API. Especially new mapper will not know about this limitation and could be irritated, confused or even discouraged to see hours of work be rejected by the API. For example: a new mapper maps 200+ rectangular buildings during a mapathon over the course of 3 hours (this would be about 1 building per minute). As this totals to a number of over 1000 _"changes"_, it will be rejected by the rate limiting of the API. This is not a great user experience, as now all the mapper can do is to wait 17+ hours in order for his quota to have grown sufficiently to accept the change, or undo an unknown amount of changes to get back within their current quota.
It would be better if OSM editor software would inform the user beforehand (i.e. while mapping) that the user is approaching the rate limit. Optionally, in the case when a limit was hit, an OSM editor could also show how many changes would have to be undone or how long the required wait would be.
In order to implement such features into OSM editors, the values for these limits would need to be known to the applications, as using any hardcoded values might get outdated any time when these settings are changed on the API side.
### Description
It would be possible to include the settings of the rate limiting in the response of the capabilities call, for example like this:
```xml
<osm version="0.6" …>
<api>
<version minimum="0.6" maximum="0.6"/>
…
<ratelimit min_changes_per_hour="100" initial_changes_per_hour="1000" max_changes_per_hour="100000" days_to_max_changes="7" />
…
</api>
…
</osm>
```
It might also be useful to add an indication which "algorithm" is used to calculate the respective current rate limit value, to accommodate potential future changes to the internal method. For example by adding a `algorithm_version` attribute.
Alternatively (or additionally), the capabilities call could return the user-specific current rate limit for the logged in user when (OAuth2 bearer) credentials are provided during the call to the `capabilities` (or `user/details`?) request.
### Screenshots
_No response_
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/4380
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/4380 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231130/edc769c2/attachment-0001.htm>
More information about the rails-dev
mailing list