<p></p>
<h3 dir="auto">Problem</h3>
<p dir="auto">Recently, hourly upload limits (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1967127731" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4319" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4319/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4319">#4319</a>) 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 <em>"changes"</em>, 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.</p>
<p dir="auto">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.</p>
<p dir="auto">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.</p>
<h3 dir="auto">Description</h3>
<p dir="auto">It would be possible to include the settings of the rate limiting in the response of the capabilities call, for example like this:</p>
<div class="highlight highlight-text-xml" dir="auto"><pre class="notranslate"><<span class="pl-ent">osm</span> <span class="pl-e">version</span>=<span class="pl-s"><span class="pl-pds">"</span>0.6<span class="pl-pds">"</span></span> …>
<<span class="pl-ent">api</span>>
<<span class="pl-ent">version</span> <span class="pl-e">minimum</span>=<span class="pl-s"><span class="pl-pds">"</span>0.6<span class="pl-pds">"</span></span> <span class="pl-e">maximum</span>=<span class="pl-s"><span class="pl-pds">"</span>0.6<span class="pl-pds">"</span></span>/>
…
<<span class="pl-ent">ratelimit</span> <span class="pl-e">min_changes_per_hour</span>=<span class="pl-s"><span class="pl-pds">"</span>100<span class="pl-pds">"</span></span> <span class="pl-e">initial_changes_per_hour</span>=<span class="pl-s"><span class="pl-pds">"</span>1000<span class="pl-pds">"</span></span> <span class="pl-e">max_changes_per_hour</span>=<span class="pl-s"><span class="pl-pds">"</span>100000<span class="pl-pds">"</span></span> <span class="pl-e">days_to_max_changes</span>=<span class="pl-s"><span class="pl-pds">"</span>7<span class="pl-pds">"</span></span> />
…
</<span class="pl-ent">api</span>>
…
</<span class="pl-ent">osm</span>></pre></div>
<p dir="auto">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 <code class="notranslate">algorithm_version</code> attribute.</p>
<p dir="auto">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 <code class="notranslate">capabilities</code> (or <code class="notranslate">user/details</code>?) request.</p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><em>No response</em></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/4380">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLI3A3KKNEOFG3HLE7LYHBXENAVCNFSM6AAAAABABBQXRWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTQNBYGIYDQNA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJ2O4A527SVPJA23QLYHBXENA5CNFSM6AAAAABABBQXRWWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHQT4XUQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/4380</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/4380",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/4380",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>