Trợ giúp về API MediaWiki

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

action=edit

(main | edit)
  • Mô đun này cần quyền đọc.
  • Mô đun này cần quyền ghi.
  • Mô đun này chỉ có nhận các yêu cầu POST.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

Tạo và sửa trang.

Các tham số:
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.

Type: integer
section

Số phần trang. 0 là phần đầu; new là phần mới.

sectiontitle

Tên của phần mới.

text

Nội dung trang.

summary

Tóm lược sửa đổi. Cũng là tên phần khi section=new và sectiontitle không được đặt.

tags

Change tags to apply to the revision.

Các giá trị (phân tách bằng |):
minor

Sửa đổi nhỏ.

Type: boolean (details)
notminor

Sửa đổi không nhỏ.

Type: boolean (details)
bot

Đánh dấu sửa đổi này là do bot thực hiện.

Type: boolean (details)
basetimestamp

Timestamp of the base revision, used to detect edit conflicts. May be obtained through action=query&prop=revisions&rvprop=timestamp.

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

Không sửa đổi trang nếu nó đã tồn tại.

Type: boolean (details)
nocreate

Gây lỗi nếu trang không tồn tại.

Type: boolean (details)
watch
Bị phản đối.

Thêm trang vào danh sách theo dõi của người dùng hiện tại.

Type: boolean (details)
unwatch
Bị phản đối.

Bỏ trang này khỏi danh sách theo dõi của người dùng hiện tại.

Type: boolean (details)
watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

Một trong các giá trị: watch, unwatch, preferences, nochange
Mặc định: 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

Hoàn tác sửa đổi này. Ghi đè text, prependtext và $ 1appendtext.

The value must be no less than 0.
Type: integer
undoafter

Hoàn tác tất cả các sửa đổi từ undo cho tới sửa đổi này. Nếu không được thiết lập, chỉ cần lùi lại một sửa đổi.

The value must be no less than 0.
Type: integer
redirect

Tự động giải quyết các chuyển hướng.

Type: boolean (details)
contentformat

Content serialization format used for the input text.

Một trong các giá trị: application/json, text/x-wiki, text/javascript, text/css, text/plain
contentmodel

Mô hình nội dung của nội dung mới.

Một trong các giá trị: GadgetDefinition, wikitext, javascript, json, css, text
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.

Tham số này là bắt buộc.
captchaword

Lời giải đúng của CAPTCHA

captchaid

ID CAPTCHA từ yêu cầu truớc