Jump to content

API:Allusers

From mediawiki.org
Revision as of 22:28, 12 September 2014 by RobinHood70 (talk | contribs) (A little more like most API pages)
MediaWiki version:
1.11

Parameters

  • {{{from}}} – The user name to start enumerating from
  • {{{to}}} – The user name to stop enumerating at
  • {{{prefix}}} – Search for all users that begin with this value
  • {{{dir}}} – Direction to sort in. One value: ascending, descending. Default: ascending
  • {{{group}}} – Limit users to given group name(s). Values (separate with '|'): bot, sysop, bureaucrat ..
    + Any other group that is defined on the wiki. This is different for every wiki; see the API help or action=paraminfo for a list of possible values
  • {{{excludegroup}}} – Exclude users in given group name(s)
  • {{{rights}}} – Limit users to given right(s)
  • {{{prop}}} – What pieces of information to include. Values (separate with '|')
    • blockinfo - Adds the information about a current block on the user
    • groups - Lists groups that the user is in. This uses more server resources and may return fewer results than the limit
    • implicitgroups - Lists all the groups the user is automatically in
    • rights - Lists rights that the user has
    • editcount - Adds the edit count of the user
    • registration - Adds the timestamp of when the user registered if available (may be blank)
  • {{{limit}}} – How many total user names to return. No more than 500 (5000 for bots) allowed. Default: 10
  • {{{witheditsonly}}} – Only list users who have made edits
  • {{{activeusers}}} – Only list users active in the last 30 days(s)

Example

Show a list of usernames starting with Y (or whichever sorts first after that)
Result
<api>
  <query>
    <allusers>
      <u userid="3634417" name="Y" />
      <u userid="53928" name="Y (usurped)" />
      <u userid="7341556" name="Y 12345 ut" />
      <u userid="10969800" name="Y 19" />
      <u userid="9302968" name="Y 1praneeth" />
      <u userid="5191615" name="Y 20" />
      <u userid="8724565" name="Y 2112 Y" />
      <u userid="2941099" name="Y 4 yellow" />
      <u userid="13676048" name="Y 6" />
      <u userid="7423920" name="Y A D A carlos alberto" />
    </allusers>
  </query>
  <query-continue>
    <allusers aufrom="Y A N K O" />
  </query-continue>
</api>
Show a list of first 5 sysops
Result
<api>
  <query>
    <allusers>
      <u userid="111640" name="(aeropagitica)" />
      <u userid="99351" name="23skidoo" />
      <u userid="3030741" name="28bytes" />
      <u userid="365061" name="2over0" />
      <u userid="7044616" name="5 albert square" />
    </allusers>
  </query>
  <query-continue>
    <allusers aufrom="7" />
  </query-continue>
</api>

Error Codes

None