API:Stashedit

From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎日本語 • ‎中文
This page is part of the MediaWiki action API documentation.

MediaWiki action API

v · d · e

Prepare an edit in shared cache.

Parameters[edit]

  • title: Title of the page being edited.
  • section: Section number. 0 for the top section, new for a new section.
  • sectiontitle: The title for a new section.
  • text: Page content.
  • stashedtexthash: Page content hash from a prior stash to use instead.
  • summary: Change summary.
  • contentformat: Content serialization format used for the input text. Possible values: text/x-wiki (wikitext), text/javascript (javascript), text/css (css), text/plain (plain text), application/json (json).
  • contentmodel: Content model of the new content. Possible values: wikitext, javascript, css, text and json. This list may include additional values registered by extensions; on Wikimedia wikis, these include: JsonZeroConfig, Scribunto, JsonSchema.
  • baserevid: Revision ID of the base revision.
  • token: A "csrf" token retrieved from action=query&meta=tokens




action=stashedit

(main | stashedit)
  • This module is internal or unstable. Its operation may change without notice.
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: MediaWiki
  • License: GPL-2.0+

Prepare an edit in shared cache.

This is intended to be used via AJAX from the edit form to improve the performance of the page save.

Parameters:
title

Title of the page being edited.

This parameter is required.
section

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

sectiontitle

The title for a new section.

text

Page content.

stashedtexthash

Page content hash from a prior stash to use instead.

summary

Change summary.

contentmodel

Content model of the new content.

This parameter is required.
One of the following values: GadgetDefinition, SecurePoll, sanitized-css, MassMessageListContent, flow-board, Scribunto, JsonSchema, NewsletterContent, wikitext, javascript, json, css, text
contentformat

Content serialization format used for the input text.

This parameter is required.
One of the following values: application/json, text/css, text/plain, text/x-wiki, text/javascript
baserevid

Revision ID of the base revision.

This parameter is required.
Type: integer
token

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

This parameter is required.