API:Protectedtitles
From MediaWiki.org
| This page is part of the MediaWiki API documentation. |
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
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
| MediaWiki version: | 1.15 |
Get a list of titles protected from creation.
Parameters[edit | edit source]
ptstart: Start listing at this protection timestampptend: End listing at this protection timestampptdir: Direction to list inolder: List most recently protected titles first (default). Note: ptstart has to be later than ptend.newer: List least recently protected titles first Note: ptstart has to be before ptend.
ptlimit: Maximum number of titles to return (10 by default)ptnamespace: Only list titles in these namespacesptlevel: Only list titles with this protection levelptprop: A pipe-separated list of properties to gettimestamp: Timestamp the title was protected (default)user: User who protected the titlecomment: Protection log commentexpiry: Expiry timestamplevel: Protection level (i.e. the right needed to be able to create the page) (default)
Example[edit | edit source]
Get the first 2 titles only sysops can create
| Result |
|---|
<?xml version="1.0" encoding="utf-8"?> <api> <query> <protectedtitles> <pt ns="0" title="Add article" timestamp="2009-02-13T21:26:59Z" level="sysop" /> <pt ns="0" title="Add an article" timestamp="2008-04-17T12:44:53Z" level="sysop" /> </protectedtitles> </query> </api> |
Error Codes[edit | edit source]
None