Last modified: 2013-10-15 20:59:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57727, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55727 - Add logaction parameter to ApiQueryRecentChanges.php
Add logaction parameter to ApiQueryRecentChanges.php
Status: NEW
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.22.0
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-15 08:00 UTC by Nathan Larson
Modified: 2013-10-15 20:59 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nathan Larson 2013-10-15 08:00:29 UTC
Allow applications to search RecentChanges by logaction. E.g., en.wikipedia.org/w/api.php?action=query&list=recentchanges&rcaction=delete|restore to retrieve only the page deletion and restoration recent changes.
Comment 1 Brad Jorsch 2013-10-15 16:10:41 UTC
Note that as described this doesn't make a whole lot of sense. If such a parameter were added, it would be roughly equivalent to the letype and/or leaction parameters to list=logevents. If this is implemented, probably both rclogtype and rclogaction should be added with behavior the same as the corresponding logevents parameters.

Note this would probably require indexes added on the rc_log_type and rc_log_action columns, and analysis of which other parameters may not be used at the same time to prevent poor query performance.

Bug 55377 may have some of the same issues, BTW.
Comment 2 Nathan Larson 2013-10-15 20:59:53 UTC
What I was hoping to do was make it so that applications could pull both page creations (rctype=new) and page deletions/restorations (rctype=log&rcaction=delete|restore) in one API pull rather than having to do two separate pulls (one to list=logevents and the other to list=recentchanges). The idea would be to reduce server load, since there could end up being a lot of these pulls, depending on how widely the extension that does the pulls gets used.

Specifically, this is for the rewrite of the RPED extension (to be renamed InterwikiExistence), which will use periodic API pulls to keep the local list of existent Wikipedia pages mostly in sync with Wikipedia's. That way, it will be possible to have existence detection (i.e. red/blue interwiki links) for interwiki links such as [[wikipedia:Foo]]. This is sort of like bug 11, but it would be used on wikis that, being outside of the WMF farm, can't use the WMF backend and therefore have to rely on the API. The code for the API pulling is similar to what you see in the InterwikiMap extension, except the API pulling would probably need to be more frequent to keep the data reasonably up-to-date, since page creations, deletions and restorations occur more frequently than changes to the interwiki table.

So my question would be, is it more efficient to implement this raction capability and thereby cut down on API pulls, or would it not be worth the expense in terms of database load? The other option is to have a bot get the data from the recentchanges IRC feed, but not all wikis are able to run a bot 24/7.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links