MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

action=allsites

(main | allsites)

Get Stats and information about sites hosted on the wiki farm. There are several ways to control the amount of data returned.

  1. Use lastModified to constrain the data by date.
  2. Use siteKey to constrain the data to a specific wiki.
  3. Use filter to control the data points returned. This can be combined with lastModified or siteKey.

Filter Syntax:

The filter syntax is a combination of array keys separated by commas and pipes to represent array structure. Ex: wikis|wiki_name,wiki_domain would return an array of wiki_name and wiki_domain under the wikis array.

See Example section for more information.

Parameters:
do

All Sites query to perform. This defaults to getSiteStats if no do param is provided. This is a place holder for API expansion.

lastModified

Only return wikis modified after the date and time specified (unix timestamp).

Type: integer
siteKey

Only return data for the specified site. This is the key provided for each wiki as md5_key in the data for each wiki.

site_key
Deprecated.

Deprecated in favor of siteKey which does not modify the data structure.

filter

Filter data points using a special syntax to represent array structure. Specify array keys separated by commas (,) and pipes (|) to indicate the array level.

Separate values with | or alternative. Maximum number of values is 50 (500 for bots).
Examples:
Get all site stats and wikis currently in the the wiki farm System.
api.php?action=allsites&format=json&formatversion=2 [open in sandbox]
Get all site stats and wikis that have been modified after Tuesday, August 21, 2018 2:58:29 PM GMT-05:00 DST.
api.php?action=allsites&format=json&formatversion=2&lastModified=1534881509 [open in sandbox]
Get a specific site by its site key. This is returned as the md5_key in the initial data set.
api.php?action=allsites&format=json&formatversion=2&siteKey=814eff22aaa6e6bd72c91dfd23730bcf [open in sandbox]
Filter the data set to specific keys to reduce that amount of data returned. This can be combined with other parameters.
api.php?action=allsites&format=json&formatversion=2&filter=totals,wikis|ss_total_wikis,wiki_name,wiki_domain,wiki_category,wiki_tags [open in sandbox]