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
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: MediaWiki
- License: GPL-2.0-or-later
Sperra ein brúkara.
- id
The block ID to modify.
- Type: integer
- user
Brúkaranavn, IP adressa ella IP interval ið tú ynskir at sperra.
- Type: user, by any of username, IP, Temporary user, IP range og user ID (e.g. "#12345")
- userid
- Deprecated.
Specify user=#ID instead.
- Type: integer
- expiry
Lokadagur. Kann vera relativt (t.d. 5 months ella 2 weeks) ella absolutt (t.d. 2014-09-18T12:34:56Z). Um ásett til infinite, indefinite, ella never, so gongur sperringin aldri út.
- Default: never
- reason
Orsøk til sperring.
- Default: (empty)
- anononly
Sperra bara dulnevndir brúkarar (t.d. ger rættingar frá dulnendum óvirknar fyri hesa IP adressuna).
- Type: boolean (details)
- nocreate
Forða fyri upprættan av konto.
- Type: boolean (details)
- autoblock
Sperrað sjálvvirkandi tað seinastu IP adressuna og allar fylgjandi IP adressur, sum viðkomandi roynir at rætta/skriva frá.
- Type: boolean (details)
- noemail
Forða brúkaranum í at senda teldupost gjøgnum wikiina. (Krevur
blockemailrættindini).- Type: boolean (details)
- hidename
Fjal brúkaranavnið frá sperringarlogginum. (Krevur
hideuserrættindi).- Type: boolean (details)
- allowusertalk
Loyv brúkaranum at skriva á sína egnu síðu (avhongur av $wgBlockAllowsUTEdit).
- Type: boolean (details)
- reblock
Um brúkarin longu er sperraður, yvirskriva so tað verandi sperringina.
- Type: boolean (details)
- newblock
Add another block even if the user is already blocked.
- Type: boolean (details)
- watchuser
Watch the user's or IP address's user and talk pages.
- Type: boolean (details)
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.
- Type: page title
- Separate values with | or alternative.
- Maximum number of values is 10.
- Only accepts pages that exist.
- 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
- To specify all values, use *.
- token
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
- Sperra IP adressuna 192.0.2.5 í tríggjar dagar við orsøkini First strike.
- api.php?action=block&user=192.0.2.5&expiry=3%20days&reason=First%20strike&token=123ABC [open in sandbox]
- Sperra brúkara Vandal í óvissa tíð við orsøkini Vandalism, og forða fyri upprættan av nýggjum kontum og at senda teldupost.
- api.php?action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate=&autoblock=&noemail=&token=123ABC [open in sandbox]