> For AI agents: the complete documentation index is available at https://types-mediawiki-response.pages.dev/zh/llms.txt, the full documentation bundle is available at https://types-mediawiki-response.pages.dev/zh/llms-full.txt.

# GlobalBlocking

## Interfaces

| Interface                                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ApiGlobalBlock](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlock.md)                           | One global block record. `bgprop` controls which fields appear. From MediaWiki 1.43 the flag booleans below are real booleans (`false` included), emitted together with `bgprop=target` (also for the deprecated `bgprop=address`); earlier versions emit a flag only when the option applies, regardless of `bgprop`.                                                                                                                                                                                                                                                           |
| [ApiGlobalBlockErrorResponse](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockErrorResponse.md) | Failure response of `action=globalblock`: the legacy `error.globalblock` array, written under the root `error` key rather than as a standard `ApiErrorResponse` — see [ApiGlobalBlockLegacyError](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockLegacyError.md).                                                                                                                                                                                                                                                                       |
| [ApiGlobalBlockLegacyError](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockLegacyError.md)     | One entry of the legacy `error.globalblock` array that `action=globalblock` writes when a block or unblock fails. Unlike every other module, this one reports the failure **in-band** under the root `error` key (`{ error: { globalblock: [...] } }`) instead of a top-level error object, so that `error` carries no `code`/`info`. The shape is the same under every `errorformat`.                                                                                                                                                                                           |
| [ApiGlobalBlockResponse](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockResponse.md)           | Response of `action=globalblock`. A failed block/unblock is reported in-band under the root `error` key; with `alsolocal=1`, a failed **local** block is reported the same way while the global block still succeeds, so both keys can appear together — see [ApiGlobalBlockLegacyError](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockLegacyError.md).                                                                                                                                                                                |
| [ApiGlobalBlockResult](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockResult.md)               | Result object of `action=globalblock`. Which fields appear depends on the branch: blocking emits [ApiGlobalBlockResult.blocked](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockResult.md#blocked) plus the applied options and [ApiGlobalBlockResult.expiry](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockResult.md#expiry); unblocking emits [ApiGlobalBlockResult.unblocked](https://types-mediawiki-response.pages.dev/zh/api/extensions/globalblocks/ApiGlobalBlockResult.md#unblocked). |
