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=ratepage
(main | ratepage)
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: RatePage
- License: GPL-2.0-or-later
Allows a user to vote on a page and gets the rating for a page. Requires specifying one of two parameters: pageid or pagetitle.
Specific parameters:
Other general parameters are available.
- pageid
Page ID
- Type: integer
- pagetitle
Page title
- answer
User's page rating (from 1 to 5 inclusive by default, can be altered by configuration settings)
- Type: integer
- contest
Contest identifier
- token
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
Examples:
- Get the current rating for page Example.
- api.php?action=ratepage&pagetitle=Example [open in sandbox]
- Rate page Example with a 2.
- api.php?action=ratepage&pagetitle=Example&answer=2 [open in sandbox]