Trợ giúp về API MediaWiki

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)
  • 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à đề mục 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

Đánh dấu đây là sửa đổi nhỏ.

Type: boolean (details)
notminor

Không đánh dấu đây là sửa đổi nhỏ thậm chí nếu người dùng bật tùy chọn “Mặc định đánh dấu tất cả sửa đổi của tôi là sửa đổi nhỏ”.

Type: boolean (details)
bot

Đánh dấu sửa đổi này là sửa đổi bot.

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

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
Lỗi thờ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
Lỗi thờ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 (ignored for bot users) or do not change watch.

Một trong các giá trị: 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

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

Type: integer
The value must be no less than 0.
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.

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

Tự động giải quyết các trang đổi hướng.

Type: boolean (details)
contentformat

Content serialization format used for the input text.

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

Kiểu nội dung của nội dung mới.

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

This parameter is required.