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.
  • منبع: MediaWiki
  • License: GPL-2.0-or-later

ایجاد و ویرایش صفحه

Parameters:
title

عنوان صفحه‌ای که قصد ویرایشش را دارید. نمی‌تواند در کنار pageid استفاده شود.

pageid

شناسه صفحهٔ صفحه‌ای که می‌خواهید ویرایشش کنید. نمی‌تواند در کنار title استفاده شود.

Type: integer
section

شماره بخش. ۰ برای بخش بالا، «تازه» برای یک بخش تازه.

sectiontitle

عنوان برای بخش جدید.

text

محتوای صفحه.

summary

خلاصه را ویرایش کنید. همچنین عنوان بخش را زمانی که section=تازه و sectiontitle تنظیم نشده‌است.

tags

Change tags to apply to the revision.

Values (separate with | or alternative):
minor

این ویرایش را به‌عنوان «ویرایش جزئی» نشانه‌گذاری کن.

Type: boolean (details)
notminor

ویرایش غیر جزئی.

Type: boolean (details)
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

اگر صفحه موجود بود، ویرایش نکن.

Type: boolean (details)
nocreate

رها کردن خطا در صورتی که صفحه وجود ندارد.

Type: boolean (details)
watch
توصیه.

افزودن صفحه به فهرست پی‌گیری‌های شما

Type: boolean (details)
unwatch
توصیه.

حذف صفحه از فهرست پی‌گیری‌های شما

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
پیش‌فرض: 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

این متن را به ابتدای صفحه اضافه کنید. 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

این بازبینی را برگردانید. text، prependtext و appendtext را باطل می‌کند.

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

همه بازبینی‌ها را از undo تا این یکی برگردانید. اگر تنظیم نشد، فقط یک بازبینی را برگردانید.

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

اصلاح خودکار تغییرمسیرها.

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

مدل محتوایی محتوای جدید

One of the following values: Campaign، css، javascript، json، text، wikitext
token

A "csrf" token retrieved from action=query&meta=tokens

بلیط باید همیشه به عنوان اخرین پارامتر، یا دست کم بعد از پارامتر text فرستاده شود.

This parameter is required.