MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

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

list=globalblocks (bg)

(main | query | globalblocks)
  • This module requires read rights.
  • Source: GlobalBlocking
  • License: GPL-2.0+

List all globally blocked IP addresses.

Parameters:
bgstart

The timestamp to start enumerating from.

Type: timestamp (allowed formats)
bgend

The timestamp to stop enumerating at.

Type: timestamp (allowed formats)
bgdir

In which direction to enumerate:

newer
List oldest first. Note: bgstart has to be before bgend.
older
List newest first (default). Note: bgstart has to be later than bgend.
One of the following values: newer, older
Default: older
bgids

Pipe-separated list of block IDs to list.

Type: list of integers
Separate values with |. Maximum number of values is 50 (500 for bots).
bgaddresses

Pipe-separated list of IP addresses to search for.

Separate values with |. Maximum number of values is 50 (500 for bots).
bgip

Get all blocks applying to this IP address or CIDR range, including range blocks. Cannot be used together with bgusers. CIDR ranges broader than /16 are not accepted.

bglimit

The maximum amount of blocks to list.

No more than 500 (5,000 for bots) allowed.
Type: integer or max
Default: 10
bgprop

Which properties to get.

Values (separate with |): id, address, by, timestamp, expiry, reason, range
Default: id|address|by|timestamp|expiry|reason
Examples:
List all global blocks
api.php?action=query&list=globalblocks
List global blocks applying to IP address 192.0.2.18
api.php?action=query&list=globalblocks&bgip=192.0.2.18