Page MenuHomePhabricator

GlobalContributions: Expose data via the API
Closed, ResolvedPublic

Description

Summary

It would be useful for automated tools used by functionaries to have access to GlobalContributions data via the API.

Background

  • GlobalContributions data is currently only accessible via a special page.
  • To support bots and scripted lookups, we should expose the data in a machine-readable format over the API.

Technical notes

This should be a MW query API module, since the REST API does not have built-in support for pagination.

Acceptance criteria

Event Timeline

This should be a MW query API module

Agreed. Also REST APIs do not have the same level of documentation and ease of use, given that Special:ApiSandbox does not support REST APIs (from what I can see).

This should be a MW query API module

Agreed. Also REST APIs do not have the same level of documentation and ease of use, given that Special:ApiSandbox does not support REST APIs (from what I can see).

AIUI, there's work in progress on a ApiSandbox-type solution for REST APIs, using Swagger. But yeah a MW query API module sounds fine for this.

Change #1131699 had a related patch set uploaded (by Máté Szabó; author: Máté Szabó):

[mediawiki/extensions/CheckUser@master] GlobalContributions: Add API query module

https://gerrit.wikimedia.org/r/1131699

Change #1131699 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] GlobalContributions: Add API query module

https://gerrit.wikimedia.org/r/1131699

Change #1131782 had a related patch set uploaded (by Kosta Harlan; author: Máté Szabó):

[mediawiki/extensions/CheckUser@wmf/1.44.0-wmf.22] GlobalContributions: Add API query module

https://gerrit.wikimedia.org/r/1131782

Change #1131782 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@wmf/1.44.0-wmf.22] GlobalContributions: Add API query module

https://gerrit.wikimedia.org/r/1131782

Mentioned in SAL (#wikimedia-operations) [2025-03-27T20:07:18Z] <sbassett@deploy1003> Started scap sync-world: Backport for [[gerrit:1131782|GlobalContributions: Add API query module (T390156)]], [[gerrit:1131803|LoginNotify#sendNotice: Add IP and UA to log message (T390141)]]

Mentioned in SAL (#wikimedia-operations) [2025-03-27T20:39:53Z] <sbassett@deploy1003> Started scap sync-world: Backport for [[gerrit:1131803|LoginNotify#sendNotice: Add IP and UA to log message (T390141)]], [[gerrit:1131782|GlobalContributions: Add API query module (T390156)]]

Djackson-ctr subscribed.

QA is completed, per the Acceptance Criteria I have verified (GlobalContributions data is now available via API Query Module, and doesn't currently support lookups for IP addresses or IP address ranges).