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=edit
- Ta modul zahteva pravice branja.
- This module requires write rights.
- Ta modul sprejema samo zahtevke POST.
- Source: MediaWiki
- License: GPL-2.0-or-later
Ustvarjanje in urejanje strani.
- title
Naslov strani za urejanje. Ni ga mogoče uporabiti skupaj z pageid.
- pageid
Page ID of the page to edit. Cannot be used together with title.
- Vtipkajte: celo število
- section
Section identifier. 0 for the top section, new for a new section. Often a positive integer, but can also be non-numeric.
- sectiontitle
The title for a new section when using section=new.
- text
Vsebina strani.
- 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.
- Values (separate with | or alternative):
- minor
Mark this edit as a minor edit.
- Type: boolean (details)
- notminor
Do not mark this edit as a minor edit even if the "Vsa urejanja označi kot manjša" user preference is set.
- Type: boolean (details)
- bot
Mark this edit as a bot edit.
- 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.
- Vtipkajte: celo število
- 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
Don't edit the page if it exists already.
- Type: boolean (details)
- nocreate
Throw an error if the page doesn't exist.
- Type: boolean (details)
- watch
- Opuščeno.
Add the page to the current user's watchlist.
- Type: boolean (details)
- unwatch
- Opuščeno.
Remove the page from the current user's watchlist.
- Type: boolean (details)
- watchlist
Unconditionally add or remove the page from the current user's watchlist, use preferences (ignored for bot users) or do not change watch.
- One of the following values: nochange, preferences, unwatch, watch
- Privzeto: preferences
- watchlistexpiry
Watchlist expiry timestamp. Omit this parameter entirely to leave the current expiry unchanged.
- Type: expiry (details)
- 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.
- Vtipkajte: celo število
- The Vrednost ne sme biti manjša od 0.
- undoafter
Undo all revisions from undo to this one. If not set, just undo one revision.
- Vtipkajte: celo število
- The Vrednost ne sme biti manjša od 0.
- redirect
Automatically resolve redirects.
- Type: boolean (details)
- contentformat
Content serialization format used for the input text.
- One of the following values: 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.
- One of the following values: GadgetDefinition, JsonSchema, MassMessageListContent, Scribunto, SecurePoll, css, javascript, json, sanitized-css, text, unknown, wikitext
- token
A "csrf" token retrieved from action=query&meta=tokens
The token should always be sent as the last parameter, or at least after the text parameter.
- Ta parameter je obvezen.
- returnto
Naslov strani. Če je shranjevanje urejanja ustvarilo začasen račun, se lahko API odzove z URL-jem, ki ga mora odjemalec obiskati, da dokonča prijavo. Če je ta parameter naveden, bo URL preusmerjen na dano stran namesto na stran, ki je bila urejena.
- Vrsta: naslov strani
- Sprejme neobstoječe strani.
- returntoquery
Poizvedbeni parametri URL-ja (z začetnim ?). Če je shranjevanje urejanja ustvarilo začasen račun, se lahko API odzove z URL-jem, ki bi ga moral odjemalec obiskati, da dokonča prijavo. Če je na voljo ta parameter, bo URL preusmerjen na stran z danimi parametri poizvedbe.
- Default: (empty)
- returntoanchor
Delček URL-ja (z začetnim #). Če je shranjevanje urejanja ustvarilo začasen račun, se lahko API odzove z URL-jem, ki bi ga moral odjemalec obiskati, da dokonča prijavo. Če je naveden ta parameter, bo URL preusmerjen na stran z danim fragmentom.
- Default: (empty)
- captchaword
Odgovorite na CAPTCHA
- captchaid
ID CAPTCHA iz prejšnjega zahtevka
- Edit a page.
- api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&baserevid=1234567&token=123ABC [open in sandbox]
- 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 [open in sandbox]
- 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 [open in sandbox]