https://bugzilla.wikimedia.org/show_bug.cgi?id=20426

           Summary: API: Fall back to max. limits instead of doing nothing
                    at all if given limit is too big
           Product: MediaWiki
           Version: unspecified
          Platform: All
               URL: http://als.wikipedia.org/w/api.php?action=query&list=sea
                    rch&srwhat=text&srsearch=kategorie&srlimit=500
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: API
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]


Max. limits can be and are changed on the server-side, like recently for
list=search; bots can log off e.g. (5000=>500); and rate limiting etc. is
planned, thus let the API output fall back to the maximally allowed limit
instead of doing nothing at all if the given limit is too big!

Example (bots > *10):
*
http://als.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&srsearch=kategorie&srlimit=500
formerly worked. Imagine a ("simple") script using this URL, it has to be
changed to "50" now, or it will fatally fail. Of course it could look for
<error code="srlimit" info="srlimit may not be over 50 (set to 500) for users"
xml:space="preserve">
and adapt its URL, but if it isn't too hard to do, just fall back to the max.
limit on the server side automatically, if possible. Maybe create a parameter
&limitfallback=1 (e.g.) to let the server do so, some scripts may rely on a
specific count if *from is given.

*Otherwise* mention somewhere in the API documentation that allowed limits can
(and will) change (e.g. during server attacks/problems, or like for
list=search) and mention that a helping error code will appear on top then. So
that people know that quick-and-dirty scripts will just fail in those cases ;-)


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to