Extension:GlobalBlocking/API

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Global blocking

Allows you to create a new block, remove a block, or modify one.

Parameters

  • <translate> <tvar1>{{{maxallowed}}}</> (<tvar
  • <translate> <tvar1>{{{maxallowed}}}</> (<tvar
  • <translate> <tvar1>{{{maxallowed}}}</> (<tvar
  • <translate> <tvar1>{{{maxallowed}}}</> (<tvar
  • <translate> <tvar1>{{{maxallowed}}}</> (<tvar
  • <translate> <tvar1>{{{maxallowed}}}</> (<tvar
  • <translate> <tvar1>{{{maxallowed}}}</> (<tvar

Example

Note: Request must be POSTed.

Blocking 127.0.0.1 indefinitely with the reason of "Cross wiki abuse"

<translate> Result</translate>
<?xml version="1.0"?>
<api>
  <globalblock user="127.0.0.1" blocked="" expiry="infinite" />
</api>

List global blocks

View a list of currently blocked IP addresses/ranges.

Parameters

  • bgstart: The timestamp to start enumerating from
  • bgend: The timestamp to stop enumerating at
  • bgdir: The direction in which to enumerate (older, newer)
  • bgids: Pipe-separated list of block IDs to list (optional)
  • bgaddresses: Pipe-separated list of addresses to search for (optional)
  • bgip: Get all blocks applying to this IP or CIDR range, including range blocks. (Cannot be used together with bkusers. IPv4 CIDR ranges broader than /16 are not accepted; however, IPv6 ranges can be of any size less than /4)
  • bglimit: The maximum number of blocks to list
  • bgprop: Which properties to get (id|address|by|timestamp|expiry|reason|range)

Errors codes

  • cidrtoobroad: CIDR ranges broader than /16 are not accepted.
  • invalidtitle: Bad title 'title'.
  • readapidenied: You need read permission to use this module.

Example

List all global blocks

<translate> Result</translate>
<api>
  <query-continue>
    <globalblocks bgstart="2009-10-03T12:10:59Z" />
  </query-continue>
  <query>
    <globalblocks>
      <block id="2301" address="82.49.115.227" />
      <block id="2297" address="59.86.157.24" anononly="" />
      <block id="2296" address="83.79.31.175" anononly="" />
      <block id="2287" address="81.18.116.66" />
      <block id="2286" address="141.223.237.76" />
      <block id="2280" address="125.184.11.164" />
      <block id="2279" address="124.197.47.74" />
      <block id="2278" address="115.139.25.18" />
      <block id="2277" address="111.92.160.26" />
      <block id="2276" address="89.248.172.146" />
    </globalblocks>
  </query>
</api>



Module "globalblock" not found.