API:Protectedtitles

From MediaWiki.org
Jump to: navigation, search
This page is part of the MediaWiki action API documentation.

MediaWiki action API

v · d · e

Get a list of titles protected from creation.

Parameters[edit]

  • ptnamespace: Only list titles in these namespaces Type: namespace (pipe-separated)
  • ptlevel: Only list titles with this protection level Type: string (pipe-separated)
  • ptlimit: Maximum number of titles to return No more than 500 (5000 for bots) allowed. (Default: 10)
  • ptdir: Direction to list in. (Default: older)
    • older: List most recently protected titles first. Note: ptstart must be later than ptend.
    • newer: List least recently protected titles first. Note: ptstart must be earlier than ptend.
  • ptstart: Start listing at this protection timestamp
  • ptend: End listing at this protection timestamp
  • ptprop: A pipe-separated list of properties to get. (Default: timestamp|level)
    • timestamp: Timestamp the title was protected
    • user: User who protected the title
    • userid: User id who protected the title 1.17+
    • comment: Protection log comment
    • parsedcomment: Parsed protection log comment 1.16+
    • expiry: Expiry timestamp
    • level: Protection level (i.e. the right needed to be able to create the page)
  • continue: When more results are available, use this to continue 1.23+

Example[edit]

Get the first 2 titles only sysops can create

Error Codes[edit]

None