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

(main | edit)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Font : MediaWiki
  • Licéncia : GPL-2.0-or-later

Crea i edita pàgines.

Paramètres :
title

Title of the page to edit. Cannot be used together with pageid.

pageid

Page ID of the page to edit. Cannot be used together with title.

Tipus: enter
section

Section number. 0 for the top section, new for a new section.

sectiontitle

El títol d’una secció nova.

text

Contingut de la pàgina.

summary

Edit summary. Also section title when section=new and sectiontitle is not set.

tags

Change tags to apply to the revision.

Values (separate with | or alternative):
minor

Marqueu aquesta edició com a menor.

Type: boolean (details)
notminor

Modificacion pas menora.

Type: boolean (details)
bot

Marcar aquesta modificacion coma efectuada per un robòt.

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.

Tipus: enter
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

No editeu aquesta pàgina si ja existeix.

Type: boolean (details)
nocreate

Throw an error if the page doesn't exist.

Type: boolean (details)
watch
Obsolèt.

Add the page to the current user's watchlist.

Type: boolean (details)
unwatch
Obsolèt.

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 or do not change watch.

One of the following values: nochange, preferences, unwatch, watch
Per defecte: 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. Overrides text.

appendtext

Add this text to the end of the page. Overrides text.

Use section=new to append a new section, rather than this parameter.

undo

Undo this revision. Overrides text, prependtext and appendtext.

Tipus: enter
The value must be no less than 0.
undoafter

Undo all revisions from undo to this one. If not set, just undo one revision.

Tipus: enter
The value must be no less than 0.
redirect

Automatically resolve redirects.

Type: boolean (details)
contentformat

Content serialization format used for the input text.

One of the following values: application/json, text/css, text/javascript, text/plain, text/x-wiki
contentmodel

Model de contingut del nou contingut.

One of the following values: GeoJSON, GeoJson, css, javascript, json, smw/schema, text, 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.

Cal aquest paràmetre.