Nápověda k MediaWiki API
Toto je automaticky generovaná dokumentační stránka k MediaWiki API.
Dokumentace a příklady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=edit
- Tento modul vyžaduje oprávnění ke čtení.
- Tento modul vyžaduje oprávnění k zápisu.
- Tento modul přijímá pouze požadavky POST.
- Zdroj: MediaWiki
- Licence: GPL-2.0-or-later
Vytvářet a upravovat stránky.
- title
- Název stránky, kterou chcete editovat. Nelze použít společně s pageid. 
- pageid
- ID stránky, která se má editovat. Není možné použít společně s title. 
- Type: integer
- section
- Section identifier. 0 for the top section, new for a new section. Often a positive integer, but can also be non-numeric. 
- sectiontitle
- Název nové sekce při použití section=new. 
- text
- Obsah stránky. 
- summary
- Edit summary. - When this parameter is not provided or empty, an edit summary may be generated automatically. - When using section=new and sectiontitle is not provided, the value of this parameter is used for the section title instead, and an edit summary is generated automatically. 
- Change tags to apply to the revision. 
- Hodnoty (oddělené | nebo alternativou.):
- minor
- Označit toto jako malou editaci 
- Type: boolean (details)
- notminor
- Nemalá editace. 
- Type: boolean (details)
- bot
- Označit tuto editaci jako editaci robota. 
- Type: boolean (details)
- baserevid
- ID of the base revision, used to detect edit conflicts. May be obtained through action=query&prop=revisions. Self-conflicts cause the edit to fail unless basetimestamp is set. 
- Type: integer
- basetimestamp
- Timestamp of the base revision, used to detect edit conflicts. May be obtained through action=query&prop=revisions&rvprop=timestamp. Self-conflicts are ignored. 
- Type: timestamp (allowed formats)
- starttimestamp
- Timestamp when the editing process began, used to detect edit conflicts. An appropriate value may be obtained using curtimestamp when beginning the edit process (e.g. when loading the page content to edit). 
- Type: timestamp (allowed formats)
- recreate
- Override any errors about the page having been deleted in the meantime. 
- Type: boolean (details)
- createonly
- Needitovat stránku, pokud již existuje. 
- Type: boolean (details)
- nocreate
- Pokud stránka neexistuje, vrátit chybu. 
- Type: boolean (details)
- watch
- Zastaralý.
- Přidat stránku na seznam sledovaných. 
- Type: boolean (details)
- unwatch
- Zastaralý.
- Odstranit stránku ze seznamu sledovaných. 
- Type: boolean (details)
- watchlist
- Bezpodmínečně přidat nebo odstranit stránku ze sledovaných stránek aktuálního uživatele, použít nastavení nebo neměnit sledování. 
- Jedna z následujících hodnot: nochange, preferences, unwatch, watch
- Default: preferences
- md5
- The MD5 hash of the text parameter, or the prependtext and appendtext parameters concatenated. If set, the edit won't be done unless the hash is correct. 
- prependtext
- Add this text to the beginning of the page or section. Overrides text. 
- appendtext
- Add this text to the end of the page or section. Overrides text. - Use section=new to append a new section, rather than this parameter. 
- undo
- Undo this revision. Overrides text, prependtext and appendtext. 
- Type: integer
- The value must be no less than 0.
- undoafter
- Undo all revisions from undo to this one. If not set, just undo one revision. 
- Type: integer
- The value must be no less than 0.
- redirect
- Automaticky opravit přesměrování. 
- Type: boolean (details)
- contentformat
- Content serialization format used for the input text. 
- Jedna z následujících hodnot: application/json, application/octet-stream, application/unknown, application/x-binary, text/css, text/javascript, text/plain, text/unknown, text/x-wiki, unknown/unknown
- contentmodel
- Content model of the new content. 
- Jedna z následujících hodnot: Campaign, GadgetDefinition, Scribunto, css, javascript, json, text, unknown, wikitext
- token
- Token typu „csrf“ získaný pomocí action=query&meta=tokens. - The token should always be sent as the last parameter, or at least after the text parameter. 
- This parameter is required.
- returnto
- Page title. If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to the given page, instead of the page that was edited. 
- Typ: název stránky
- Přijímá neexistující stránky
- returntoquery
- URL query parameters (with leading ?). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given query parameters. 
- Implicitní hodnota: (prázdné)
- returntoanchor
- URL fragment (with leading #). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given fragment. 
- Implicitní hodnota: (prázdné)
- captchaword
- Odpověď na CAPTCHA 
- captchaid
- ID CAPTCHA z předchozího požadavku 
- Upravit stránku.
- api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&baserevid=1234567&token=123ABC [otevřít v pískovišti]
- Prepend __NOTOC__ to a page.
- api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=2007-08-24T12:34:54Z&token=123ABC [otevřít v pískovišti]
- Undo revisions 13579 through 13585 with autosummary.
- api.php?action=edit&title=Test&undo=13585&undoafter=13579&basetimestamp=2007-08-24T12:34:54Z&token=123ABC [otevřít v pískovišti]