API:Allusers
From MediaWiki.org
| This page is part of the MediaWiki action API documentation. |
MediaWiki action API
- Introduction and quick start
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Searching (by title, content, coordinates...)
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Create and edit pages
- Move pages
- Merge pages
- Rollback
- Delete pages
- Restore deleted revisions
- (Un)protect pages
- (Un)block users
- (Un)watch pages
- Mark revisions of watched pages as visited
- Send email
- Patrol changes
- Import pages
- Change user group membership
- Upload files
- User options
- Tokens
- Page language
- More...
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
| Allusers | ||
|---|---|---|
| Enumerate all registered users, ordered by username This module cannot be used as a Generator. |
||
| Prefix | au | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
Contents
Parameters[edit]
aufrom: The user name to start enumerating fromauto: The user name to stop enumerating atauprefix: Search for all users that begin with this valueaudir: Direction to sort in. One value: ascending, descending. Default: ascendingaugroup: Limit users to given group name(s). Possible values: 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.auexcludegroup: Exclude users in given group name(s). Can not be used together with 'group'.aurights: Limit users to given right(s)auprop: What pieces of information to include.blockinfo: Adds the information about a current block on the usergroups: Lists groups that the user is in. This uses more server resources and may return fewer results than the limitimplicitgroups: Lists all the groups the user is automatically inrights: Lists rights that the user haseditcount: Adds the edit count of the userregistration: Adds the timestamp of when the user registered if available (may be blank) 1.12+
aulimit: How many total user names to return. No more than 500 (5000 for bots) allowed. (Default: 10)auwitheditsonly: Only list users who have made editsauactiveusers: Only list users active in the last 30 days(s)
Example[edit]
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[edit]
| Code | Info |
|---|---|
| augroup-excludegroup | group and excludegroup cannot be used together |
Note[edit]
This api call is case sensitive, so aufrom=YA doesn't have the same results as aufrom=Ya.