API:SetNotificationTimestamp
From MediaWiki.org
![]() |
This page is part of the MediaWiki API documentation. |
Language: | English • 日本語 |
---|
Quick overview:
- Quick start guide
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Search suggestions
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Create and edit pages
- Move pages
- Rollback
- Delete pages
- Restore deleted revisions
- (Un)protect pages
- (Un)block users
- (Un)watch pages
- Mark revisions of watched pages as visited
- Send email
- Patrol changes
- Import pages
- Change user group membership
- Upload files
- User options
- Tokens
- Page language
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
MediaWiki version: | 1.14 |
This module is used to mark revisions of watched pages as visited. This affects the highlighting of changed pages in the watchlist and history, and the sending of email when the "Email me when a page on my watchlist is changed" preference is enabled.
This module requires POST requests; GET requests will not work.
Token[edit | edit source]
Users of this module must be correctly logged in, as a valid edit token is required. For example:
Obtaining an edit token
Result |
---|
<?xml version="1.0"?> <api> <query> <pages> <page pageid="15580374" ns="0" title="Main Page" contentmodel="wikitext" pagelanguage="en" touched="2013-12-26T14:54:02Z" lastrevid="574690625" counter="" length="6391" starttimestamp="2013-12-26T15:14:00Z" edittoken="1ccc023d58931de3acc6c39c7af2e420+\" /> </pages> </query> </api> |
Parameters[edit | edit source]
entirewatchlist
: Work on all watched pages.token
: Edit token retrieved in previous step (required).timestamp
: Timestamp to which to set the notification timestamp.torevid
: Revision to set the notification timestamp to (one page only).newerthanrevid
: Revision to set the notification timestamp newer than (one page only).titles
: A list of titles to work on. Standard rules and limits apply. (See API:Query#Specifying pages.)pageids
: A list of page IDs to work on. Standard rules and limits apply.revids
: A list of revision IDs to work on. Standard rules and limits apply.redirects
: Automatically resolve redirects.converttitles
: Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan, iu, kk, ku, shi, sr, tg, uz, zh.generator
: Get the list of pages to work on using a generator. (See API:Query#Generators.)
Examples[edit | edit source]
Marking entire watchlist as visited
Result |
---|
<?xml version="1.0"?> <api> <setnotificationtimestamp notificationtimestamp="" /> </api> |
Marking all edits to "Wikipedia talk:Sandbox" since 1 January 2012 as unviewed
Result |
---|
<?xml version="1.0"?> <api> <setnotificationtimestamp> <page ns="4" title="Wikipedia:Sandbox" notificationtimestamp="2012-01-01T00:00:00Z" /> </setnotificationtimestamp> </api> |