MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

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

action=block

(main | block)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

Blokir pengguna.

Specific parameters:
Other general parameters are available.
user

Nama pengguna untuk diblokir.

Tipe: pengguna, dengan salah satu dari nama pengguna, IP, rentang IP dan ID pengguna (mis. "#12345")
userid
Deprecated.

Tentukan user=#ID.

Type: integer
expiry

Waktu kedaluwarsa. Dapat berupa waktu relatif (seperti 5 bulan atau 2 minggu) atau waktu absolut (seperti 2014-09-18T12:34:56Z). Jika diatur ke selamanya, tak terbatas, atau tidak pernah, pemblokiran itu tidak akan berakhir.

Default: never
reason

Alasan pemblokiran.

Default: (empty)
anononly

Blokir hanya pengguna anonim (seperti menonaktifkan suntingan anonim untuk alamat IP ini).

Type: boolean (details)
nocreate

Cegah pembuatan akun.

Type: boolean (details)
autoblock

Blokir alamat IP terakhir yang digunakan pengguna ini, dan semua alamat IP berikutnya yang mereka coba gunakan untuk menyunting.

Type: boolean (details)
noemail

Cegah pengguna mengirimkan surel melalui wiki. (Membutuhkan hak blockemail).

Type: boolean (details)
hidename

Hide the username from the block log. (Requires the hideuser right).

Type: boolean (details)
allowusertalk

Allow the user to edit their own talk page (depends on $wgBlockAllowsUTEdit).

Type: boolean (details)
reblock

Jika pengguna tersebut sudah diblokir, atur ulang setelah pemblokirannya.

Type: boolean (details)
watchuser

Watch the user's or IP address's user and talk pages.

Type: boolean (details)
tags

Change tags to apply to the entry in the block log.

Values (separate with | or alternative):
partial

Block user from specific pages or namespaces rather than the entire site.

Type: boolean (details)
pagerestrictions

List of titles to block the user from editing. Only applies when partial is set to true.

Tipe: judul halaman
Separate values with | or alternative.
Maximum number of values is 10.
Hanya menerima halaman yang ada.
namespacerestrictions

List of namespace IDs to block the user from editing. Only applies when partial is set to true.

Values (separate with | or alternative): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 710, 711, 828, 829, 2300, 2301, 2302, 2303, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009
To specify all values, use *.
token

A "csrf" token retrieved from action=query&meta=tokens

This parameter is required.
Examples:
Blokir alamat IP 192.0.2.5 selama tiga hari dengan sebuah alasan.
api.php?action=block&user=192.0.2.5&expiry=3%20days&reason=First%20strike&token=123ABC [open in sandbox]
Block user Vandal indefinitely with a reason, and prevent new account creation and email sending.
api.php?action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate=&autoblock=&noemail=&token=123ABC [open in sandbox]