Currently ApiQueryAllUsers and ApiQueryUsers report block information only for local blocks. It would be nice if extensions implementing global blocks could/would somehow hook into these modules to provide information for non-local blocks as well.
Any such solution must not result in 5000 single-user database queries being made for something like action=query&list=allusers&aulimit=5000&auprop=blockinfo.
Original report:
(I see it as a bug but ok to call it a current API feature)
It is often needed to get a list of all participants of a given Wikimedia subproject X, filtered by different criteria: not indefinitely blocked in X, not currently blocked, registration date, number of edits etc. The most prominent use by myself - public lists of potential candidates and voters for each ArbCom elections since ca. 2012
While doing similar for Russian Wikinews I have discovered that it is highly difficult to sort out indefinitely blocked. Because "blockinfo" field reports only locally blocked but not globally blocked ("locked" in the project lingo).
Let's take Russian Wikinews and two indefinitely blocked there: Hhhggg and LskAndrew.
The last one is blocked by a local admin and it is easy to see it from blockinfo:
https://ru.wikinews.org/w/api.php?format=jsonfm&action=query&meta=globaluserinfo&guiuser=LskAndrew
But the first one from the point of view of the AP is still here with us:
It took sime time to find two rather convoluted solutions to that, both from a previously obtained list for a separate check for each list item:
https://ru.wikinews.org/w/api.php?format=jsonfm&action=query&meta=globaluserinfo&guiuser=Hhhggg
and then if ( 'locked' in MyJsonObject.query.globaluserinfo )
or
and then if ( MyJsonObject.query.logevents.length > 0 )
is anything more reasonnable can be proposed from the interface?