API:Logevents

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

Quick overview:

v · d · e


MediaWiki version: 1.9

Get a list of all logged events, à la Special:Log. This module cannot be used as a generator.

Parameters[edit | edit source]

  • leprop: Which properties to get
    • ids: Page ID of the page in question and log ID (default)
    • title: Title of the page in question (default)
    • type: Type of log entry (default)
    • user: User responsible for the log entry (default)
    • userid: The user ID who was responsible for the log event. When specified for account creation events, the userid of the creating user is returned. When absent, the userid returned is that of the created account (see bugzilla:71020).
    • timestamp: Time and date the log entry was created (default)
    • comment: Log comment (default)
    • parsedcomment: The parsed comment of the event
    • details: Extra information (not present for all log types) (default)
    • tags: List tags for the event
  • letype: Only list log entries of this type
    • block
    • protect
    • rights
    • delete
    • upload
    • move
    • import
    • patrol
    • merge
    • newusers
    • Extensions may add other log types
  • leaction: Filter log actions to only this type. Overrides letype even if the action isn't related to letype.
    • block/block
    • block/unblock
    • block/reblock
    • protect/protect
    • protect/modify
    • protect/unprotect
    • protect/move_prot
    • rights/rights
    • rights/autopromote
    • upload/upload
    • upload/overwrite
    • upload/revert
    • import/upload
    • import/interwiki
    • merge/merge
    • suppress/block
    • suppress/reblock
    • review/approve
    • review/approve2
    • review/approve-i
    • review/approve2-i
    • review/approve-a
    • review/approve2-a
    • review/approve-ia
    • review/approve2-ia
    • review/unapprove
    • review/unapprove2
    • rights/erevoke
    • gblblock/gblock
    • gblblock/gblock2
    • gblblock/gunblock
    • gblblock/whitelist
    • gblblock/dwhitelist
    • gblblock/modify
    • globalauth/delete
    • globalauth/lock
    • globalauth/unlock
    • globalauth/hide
    • globalauth/unhide
    • globalauth/lockandhid
    • globalauth/setstatus
    • suppress/setstatus
    • gblrights/usergroups
    • gblrights/groupperms
    • gblrights/groupprms2
    • gblrights/groupprms3
    • suppress/hide-afl
    • suppress/unhide-afl
    • moodbar/hide
    • moodbar/restore
    • moodbar/feedback
    • move/move
    • move/move_redir
    • delete/delete
    • delete/restore
    • delete/revision
    • delete/event
    • suppress/revision
    • suppress/event
    • suppress/delete
    • patrol/patrol
    • stable/config
    • stable/modify
    • stable/reset
    • renameuser/renameuser
    • gblrights/newset
    • gblrights/setrename
    • gblrights/setnewtype
    • gblrights/setchange
    • gblrights/deleteset
    • abusefilter/modify
    • abusefilter/hit
    • suppress/oversight
    • suppress/unoversight
    • suppress/decline
    • suppress/request
    • suppress/unrequest
    • articlefeedbackv5/hidden
    • articlefeedbackv5/unhidden
    • articlefeedbackv5/flag
    • articlefeedbackv5/unflag
    • articlefeedbackv5/autoflag
    • articlefeedbackv5/autohide
    • articlefeedbackv5/feature
    • articlefeedbackv5/unfeature
    • articlefeedbackv5/resolve
    • articlefeedbackv5/unresolve
    • articlefeedbackv5/helpful
    • articlefeedbackv5/unhelpful
    • articlefeedbackv5/undo-helpful
    • articlefeedbackv5/undo-unhelpful
    • articlefeedbackv5/clear-flags
    • pagetriage-curation/reviewed
    • pagetriage-curation/unreviewed
    • pagetriage-curation/tag
    • pagetriage-curation/delete
    • pagetriage-deletion/delete
    • newusers/newusers
    • newusers/create
    • newusers/create2
    • newusers/autocreate
  • leuser: Only list log entries made by this user
  • letitle: Only list log entries related to this title
  • lestart: The timestamp to start listing from
  • leend: The timestamp to end listing at
  • ledir: Direction to list in
    • older: List newest log entries first (default). Note: lestart has to be later than leend.
    • newer: List oldest log entries first. Note: lestart has to be before leend.
  • lelimit: Maximum number of log entries to list (10 by default)
  • leprefix: Filter entries that start with this prefix. Disabled in Miser Mode
  • letag: Only list event entries tagged with this tag

Example[edit | edit source]

List the 3 most recent page moves

Error Codes[edit | edit source]

  • code: leparam_user
    • info: User name username not found
  • code: leparam_title
    • info: Bad title value 'title'
      • This happens when you set letitle to an invalid title

Notes[edit | edit source]

For autoblock unblock entries, the page title is shown as "User:$blockid". This is indeed not a User page, just the way it is stored. As per bug 17781

Child elements[edit | edit source]

Here are some examples of child elements that reveal log parameters:

Block

<block flags="nocreate" duration="3 days" expiry="2014-09-18T20:35:54Z" />

Move

<move new_ns="0" new_title="Foo" suppressredirect="" />

Patrol

<patrol cur="12" prev="0" auto="1" />

Rights

<rights new="sysop" old="" />

See also[edit | edit source]

Log events Events: BlockingImportingMerging historiesPage deletionPage movingPage restorationPatrollingProtectionRenaming a userRevision deletionThankingUploadingUser creationUser rights management
Miscellaneous: APIlogging tableNull revision